Created
September 29, 2019 01:27
-
-
Save Karn/a0c275a0ccacbf7e6465766bf097218b 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
Notify.with(context) | |
// Defines the content of the Notification | |
.content { | |
title = "New dessert menu" | |
text = "The Cheesecake Factory has a new dessert for you to try!" | |
} | |
// Bubblize the Notfication! | |
.bubblize { | |
// Create bubble intent | |
val target = Intent(context, BubbleActivity::class.java) | |
val bubbleIntent = PendingIntent.getActivity(context, 0, target, 0 /* flags */) | |
// Set the image for the Bubble | |
bubbleIcon = IconCompat.createWithResource(context, R.drawable.ic_app_icon) | |
// Set the activity that is being shown when the Bubble is expanded. | |
targetActivity = bubbleIntent | |
} | |
.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment