I am able to create push notifications. But currently I am just able to make people land on the home screen.
How can I send people to a specific Activity? And is it possible to also put add some parameter like item_id so the activity knows what data to load?
Or if there is a good tutorial for this somewhere, that would be great as well. I can't really seem to find much good info on this by googling.
In my GCMIntentService I have this method:
@Override
protected void onMessage(Context ctxt, Intent message)
{
Bundle extras=message.getExtras();
try
{
String question_id = extras.getString("question_id");
// SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( this );
// Intent intent = new Intent(ctxt, QuestionActivity.class);
generateNotification(ctxt, extras.getString("message"), "New Message" );
}
catch ( Exception e )
{
}
}
But I am not sure how to change the generateNotification to also signal what Activity the person should land on. Thanks!