Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private fun createNotification(channelId: String, text: String, title: String, id: String, url: String, bigImage: Bitmap, pillImage: Bitmap): Notification {
return NotificationCompat.Builder(context, channelId)
.setContentTitle(title)
.setContentText(text)
.setSmallIcon(R.drawable.ic_notification)
.setContentIntent(createPendingIntent(id, url))
.setAutoCancel(true)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setSound(soundHelper.vrtNwsNotificationSound)
.setDefaults(NotificationCompat.DEFAULT_VIBRATE)
.setCustomBigContentView(createBigContentView(text, bigImage, pillImage))
.build()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment