Created
January 10, 2015 17:15
-
-
Save saket/29d0871e2c1ed4b86140 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
void showFirstNotif(){ | |
mNotifBuilder.setContentTitle("First") | |
.setContentText("Body") | |
.setWhen(activityStartTime) | |
.setSmallIcon(PhotoUtils.getAppIconResId()) | |
.setDefaults(Notification.DEFAULT_ALL) | |
.setOnlyAlertOnce(true); | |
NotificationManagerCompat.from(this).notify("Test", NOTIF_ID, mNotifBuilder.build()); | |
} | |
void showSecondNotif(){ | |
mNotifBuilder.setContentTitle("Second"); | |
final Notification notif = mNotifBuilder.build(); | |
notif.defaults = 0; | |
NotificationManagerCompat.from(this).notify("Test", NOTIF_ID, mNotifBuilder.build()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment