Android Push Notification
-
I want to implement push notifications in my android apps.what is the best way to implement.
-
I want to implement push notifications in my android apps.what is the best way to implement.
setContentView(R.layout.notification_alert); /*********** Create notification ***********/ final NotificationManager mgr= (NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE); Notification note=new Notification(R.drawable.stat_notify_chat, "Android Example Status message!", System.currentTimeMillis()); // This pending intent will open after notification click PendingIntent i=PendingIntent.getActivity(this, 0, new Intent(this, NotifyMessage.class), 0); note.setLatestEventInfo(this, "Android Example Notification Title", "This is the android example notification message", i); //After uncomment this line you will see number of notification arrived //note.number=2; mgr.notify(NOTIFY_ME_ID, note);