Display notification in info bar

/ Published in: Java
Save to your folder(s)

Copy this code and paste it in your HTML
  1. NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
  2. Notification noty = new Notification(R.drawable.icon, "Button 1 clicked", System.currentTimeMillis());
  3. noty.setLatestEventInfo(context, "Notice", msg, contentIntent);
  4. notificationManager.notify(1, noty);

URL: http://nm-blog.sanid.com/wp-content/uploads/2009/07/android_howto-hellowidget.pdf

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.