Query Regarding Android Push Notifications
I have an Android app with a working push notification set up. It works currently like this: User gets a push notification When the user taps on the push notification, he is taken
Solution 1:
a. Launch an activity from the receiver(GCM/C2DM receiver) when the push notification arrives
// Your C2DM receiver (for GCM check the Android Documentation)publicvoidonReceive(final Context context, final Intent intent)
{
if (intent.getAction().equals(com.google.android.c2dm.intent.RECEIVE))
{
//start your list view activity of notificationsIntenti=newIntent();
i.setClassName("com.test", "com.test.NotificationsActivity");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
b. Check this.
Post a Comment for "Query Regarding Android Push Notifications"