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
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(); |
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
/** | |
* Alert 1 | |
* Normal Alert | |
*/ | |
AlertDialog.Builder alertDialog = new AlertDialog.Builder(your_activity.this); // we build alert | |
alertDialog.setMessage("Alert_text") // alert text with setMessage() method | |
.setCancelable(true); // user can cancel this alert for 'true' | |
AlertDialog alert = alertDialog.create(); // we create alert for show | |
alert.setTitle("Alert_title"); |
NewerOlder