Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Beginning with Android Q, Background Activity Starts should be done by notification triggered activities.
val fullScreenIntent = Intent(this, CallActivity::class.java)
val fullScreenPendingIntent = PendingIntent.getActivity(this, 0,
fullScreenIntent, PendingIntent.FLAG_UPDATE_CURRENT)
val notificationBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
....
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setCategory(NotificationCompat.CATEGORY_CALL)
.setFullScreenIntent(fullScreenPendingIntent, true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment