Example:
PendingIntent pendingIntent = PendingIntent.getActivity(
MainActivity.this,
0,
new Intent(), //Dummy Intent do nothing
Intent.FLAG_ACTIVITY_NEW_TASK);
myNotification = new NotificationCompat.Builder(context)
.setContentTitle("Exercise of Notification!")
.setContentText("http://android-er.blogspot.com/")
.setTicker("Notification!")
.setWhen(System.currentTimeMillis())
.setContentIntent(pendingIntent)
.setDefaults(Notification.DEFAULT_SOUND)
.setAutoCancel(true)
.setSmallIcon(R.drawable.ic_launcher)
.build();
Title: Create a PendingIntent for Notification to do nothing
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 3:02 PM
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 3:02 PM
0 comments:
Post a Comment