Last active
March 1, 2018 15:22
-
-
Save sharifulislam52/88ce8dc63660d864799f3912e3f44ca4 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
Intent intent = new Intent(); | |
PendingIntent my_pIntent = PendingIntent.getActivities(your_activity.this, | |
0, new Intent[]{intent},0); | |
Notification mynoti = new Notification.Builder(your_activity.this) | |
.setTicker("Ticker_Text") | |
.setContentTitle("Content_Title") | |
.setContentText("Content_Text") | |
.setSmallIcon(R.mipmap.ic_launcher) | |
.setContentIntent(my_pIntent).getNotification(); | |
mynoti.flags = Notification.FLAG_AUTO_CANCEL; | |
NotificationManager notiManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); | |
notiManager.notify(0,mynoti); | |
// my_pIntent, your_activity, mynoti, Ticker_Text, Content_Title, Content_Text, ic_launcher, notiManager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment