feat 添加安卓配置文档

This commit is contained in:
little-snow-fox 2019-12-12 11:43:14 +08:00
parent 4afb7db4e1
commit 80435b5f8e

View File

@ -112,3 +112,24 @@ Then add the following node to `AndroidManifest.xml`:
</application> </application>
</manifest> </manifest>
``` ```
如果遇到安卓App拉起小程序后小程序无法返回App的情况需要在AndroidManifest.xml的WXEntryActivity中添加下面这段配置:
```
android:taskAffinity="your packagename"
android:launchMode="singleTask"
```
保证跳转后回到你的app的task。
实际上,我的代码如下:
```xml
<manifest>
<application>
<activity
android:name=".wxapi.WXEntryActivity"
android:label="@string/app_name"
android:exported="true"
android:taskAffinity="org.xxx.xxx.rnapp"
android:launchMode="singleTask"
/>
</application>
</manifest>
```