fix(android): Fix creating notifications on Android 13

This commit is contained in:
PapaTutuWawa 2023-08-26 23:28:07 +02:00
parent fe6d0a60c1
commit 11ea1fae12
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@
<application>
<provider
android:name="me.polynom.moxplatform_android.MoxplatformFileProvider"
android:authorities="me.polynom.moxplatform_android.fileprovider2"
android:authorities="me.polynom.moxplatform_android.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View File

@ -25,7 +25,7 @@ const val NOTIFICATION_EXTRA_ID_KEY = "notification_id"
const val NOTIFICATION_MESSAGE_EXTRA_MIME = "mime"
const val NOTIFICATION_MESSAGE_EXTRA_PATH = "path"
const val MOXPLATFORM_FILEPROVIDER_ID = "me.polynom.moxplatform_android.fileprovider2"
const val MOXPLATFORM_FILEPROVIDER_ID = "me.polynom.moxplatform_android.fileprovider"
// Shared preferences keys
const val SHARED_PREFERENCES_KEY = "me.polynom.moxplatform_android"

View File

@ -107,7 +107,7 @@ fun showMessagingNotification(context: Context, notification: Api.MessagingNotif
context.applicationContext,
0,
replyIntent,
PendingIntent.FLAG_UPDATE_CURRENT,
PendingIntent.FLAG_MUTABLE,
)
val replyAction = NotificationCompat.Action.Builder(
R.drawable.reply,
@ -132,7 +132,7 @@ fun showMessagingNotification(context: Context, notification: Api.MessagingNotif
context.applicationContext,
0,
markAsReadIntent,
PendingIntent.FLAG_UPDATE_CURRENT,
PendingIntent.FLAG_IMMUTABLE,
)
val markAsReadAction = NotificationCompat.Action.Builder(
R.drawable.mark_as_read,
@ -155,7 +155,7 @@ fun showMessagingNotification(context: Context, notification: Api.MessagingNotif
context,
notification.id.toInt(),
tapIntent,
PendingIntent.FLAG_UPDATE_CURRENT
PendingIntent.FLAG_IMMUTABLE
)
// Build the notification