Created
January 3, 2016 15:55
-
-
Save Adamwaheed/f9aa61a1a4689860948c 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 pendingIntent = PendingIntent.getActivity(MainActivity.this,0,intent,0); | |
Notification noti = new Notification.Builder(MainActivity.this) | |
.setTicker("Title") | |
.setContentTitle("Contant Tutle") | |
.setContentText("Hekko this is nust") | |
.setContentText("Content Texty") | |
.setSmallIcon(android.R.drawable.menu_frame) | |
.setContentIntent(pendingIntent).getNotification(); | |
noti.flags = Notification.FLAG_AUTO_CANCEL; | |
NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); | |
nm.notify(0,noti); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment