开发者

Avoiding to launch the app again

I've developed an app and everything is fine, but if a push the 'Home' buttom, it goes to the home screen. All right til then. But if i click on the icon to come back to the app... sometimes it comes back to the old instance of the app and sometimes it launches a new instance of the app over the old one. 开发者_JAVA百科I don't get why or when makes every casescenario happen.

Is there any way of avoiding this and come back always to the old one?

Thanks.


Try setting your activity launch mode to singleTop

Refer to the following answer:

Android: new Intent() starts new instance with android:launchMode="singleTop"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜