i have implemented push notification app. when notification tapped, how start application splash screen if app killed. want start splash screen if app killed , start inside landing screen if app in background. how handle this? please me.
add code create notification method:
intent resultintent = new intent(this, splashactivity.class); resultintent.addflags(intent.flag_activity_reorder_to_front | intent.flag_activity_single_top); resultintent.setaction(intent.action_main); resultintent.addcategory(intent.category_launcher); pendingintent resultpendingintent = pendingintent.getactivity(getapplicationcontext(), 0, resultintent, pendingintent.flag_update_current); mbuilder.setcontentintent(resultpendingintent);
play around intent flags [resultintent.addflags(/*intent flag here*/)]
, if want to:
start splash screen if app killed , start inside landing screen if app in background.
hope helps!
Comments
Post a Comment