Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APP处于一个自定义activity界面时,按下home回到桌面,再回到APP异常 #184

Open
Ariel08081214 opened this issue Mar 6, 2021 · 6 comments

Comments

@Ariel08081214
Copy link

你好。如题,当APP打开了一个activity,按home回到桌面,activity被销毁了,再回到APP没有处于那个界面上。这是咱们库的问题吗?

@listenzz
Copy link
Owner

listenzz commented Mar 6, 2021

看情况,如果是热重启,那么界面还在,如果是冷重启,就重新初始化。

@Ariel08081214
Copy link
Author

是热重启,但是被销毁了,我使用新建的demo测试了下。

@listenzz
Copy link
Owner

listenzz commented Mar 8, 2021

@danna88 你的 demo 是怎么做的呢,发我看下。这边打开开发者选项中的不保留活动,测试是没问题的。

@Ariel08081214
Copy link
Author

就是用你的集成测试demo工程,我新建一个native moudle,在里面新增的rn方法,跳转到一个activity里,很简单的步骤。要看代码只有明天了,今天下午放假了^_^ 感谢。

@listenzz
Copy link
Owner

listenzz commented Mar 9, 2021

@danna88 demo 已收到,已测试,已清楚你想表达什么。这个问题和 launchMode 有关,可以把 MainActivity 的 android:launchMode="singleTask" 移除。

参考 https://cloud.tencent.com/developer/article/1730106

@Ariel08081214
Copy link
Author

Ariel08081214 commented Mar 9, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants