android - Activity flags / launchmode / pendingintent -
i read lot on android documentation launchmode , activity flags can't figgure out.
i'm using following code open activity nothification:
intent intent = new intent(context, home.class); intent.setflags(intent.flag_activity_new_task | intent.flag_activity_single_top); pendingintent contentintent = pendingintent.getactivity(context, notification_id++, intent, pendingintent.flag_update_current);
in manifest declared home activity
android:launchmode="singleinstance"
all works fine except when close app (not in background) onstart method gets called not oncreate , have no idea why?!
i need following:
app open , visible user: user click on nothification, existing home activity active , onnewintent gets calls (works fine)
app in background (user pressed home button):: user click on nothification, existing home activity active , onnewintent gets calls (works fine)
app closed: user click on nothification, home activity gets created because first run! (does not work)
thanks help!
Comments
Post a Comment