开发者

Android - need different activities to be launched conditionally when launched from home screen

开发者 https://www.devze.com 2023-04-05 17:48 出处:网络
All, i tried different things and finally thought i post this question. My application has 2 modes. one is with out registration and other, with registration.

All, i tried different things and finally thought i post this question. My application has 2 modes. one is with out registration and other, with registration. in without registration mode, application has to behave just like normal android application. means, if user goes like A-> B-> C and at C, he clicks home button and relaunches the app, the app should come back to C, which is normal behavior. in second case, if user is registred user and he is at A->B->C and relauches the app using home button, then it should not take him to C but it should take him to "log in screen"?

how to achieve this as we will not know that activity is being started from another activity/home screen?

i tried "single top" with onNewIntent() but looks like onnewintent() is not getting called when launched 开发者_如何学运维from homescreen. all ideas are welcome.


onNewIntent is not recalled because when you press home button application just goes to background try onResume

0

精彩评论

暂无评论...
验证码 换一张
取 消