-
-
Save Arunshaik2001/93fb490922c404c9fdf7c80fbc91a324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun createBubbleMetadata( | |
contentUri: Uri, | |
icon: IconCompat | |
): NotificationCompat.BubbleMetadata { | |
val bubbleIntent = | |
PendingIntent.getActivity( | |
context, | |
REQUEST_BUBBLE, | |
Intent(context, MainActivity3::class.java) | |
.setAction(Intent.ACTION_VIEW) | |
.setData(contentUri), | |
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE | |
) | |
val builder = NotificationCompat.BubbleMetadata.Builder(bubbleIntent, icon) | |
return builder | |
.setDesiredHeightResId(R.dimen.bubble_height) | |
.setAutoExpandBubble(true) | |
.setSuppressNotification(true) | |
.build() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment