Skip to content
Snippets Groups Projects
Commit 3a3af648 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

sync service: adapt notifications for Android 12

Change-Id: I75e632fe1cde61f59a71fc08210229336014f897
parent b330586f
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ import cx.ring.R
import cx.ring.application.JamiApplication
import cx.ring.client.HomeActivity
import cx.ring.services.NotificationServiceImpl
import cx.ring.utils.ContentUriHandler
import dagger.hilt.android.AndroidEntryPoint
import net.jami.services.NotificationService
import java.util.*
......@@ -64,8 +65,8 @@ class SyncService : Service() {
.setSmallIcon(R.drawable.ic_ring_logo_white)
.setCategory(NotificationCompat.CATEGORY_PROGRESS)
.setOnlyAlertOnce(true)
.setDeleteIntent(PendingIntent.getService(applicationContext, mRandom.nextInt(), deleteIntent, 0))
.setContentIntent(PendingIntent.getActivity(applicationContext, mRandom.nextInt(), contentIntent, 0))
.setDeleteIntent(PendingIntent.getService(applicationContext, mRandom.nextInt(), deleteIntent, ContentUriHandler.immutable()))
.setContentIntent(PendingIntent.getActivity(applicationContext, mRandom.nextInt(), contentIntent, ContentUriHandler.immutable()))
.build()
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment