Created
April 9, 2019 17:08
-
-
Save timrijckaert/b31ff01c1ded0ac5bf9e71a374a9b48b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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