Android notification bar open last active activity?

喜欢而已 提交于 2019-11-30 15:29:48
Nezir

I found an answer it's about flags : Android: new Intent() starts new instance with android:launchMode="singleTop"

Intent intent= new Intent(context, YourActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);

I'm not certain I understand what you mean.

I suppose you could add an extra in the intent to specify which notification exactly was used to invoke your app. Does this help at all?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!