How To Do Notification In Android?
I am doing a helpdesk application on android. I want to implement a notification for unread tickets(customer suggestions or complaints). In iPhone version of this app, even if the
Solution 1:
call this method
privatevoidtriggerNotification(String s) {
CharSequencetitle="Hello";
CharSequencemessage= s;
NotificationManager notificationManager;
notificationManager = (NotificationManager) context
.getSystemService("notification");
Notification notification;
notification = newNotification(
com.yourPackage.R.drawable.notification, "Notifiy.. ",
System.currentTimeMillis());
PendingIntentpendingIntent= PendingIntent.getActivity(context, 0,
null, 0);
notification.setLatestEventInfo(context, title, message, pendingIntent);
notificationManager.notify(1010, notification);
}
Post a Comment for "How To Do Notification In Android?"