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> <application>
<provider <provider
android:name="me.polynom.moxplatform_android.MoxplatformFileProvider" 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:exported="false"
android:grantUriPermissions="true"> android:grantUriPermissions="true">
<meta-data <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_MIME = "mime"
const val NOTIFICATION_MESSAGE_EXTRA_PATH = "path" 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 // Shared preferences keys
const val SHARED_PREFERENCES_KEY = "me.polynom.moxplatform_android" const val SHARED_PREFERENCES_KEY = "me.polynom.moxplatform_android"

View File

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