收藏
回答

launchApp安卓无法返回APP?

安卓APP可以正常调用起来小程序,跳转到小程序后点击返回按钮,无法返回到APP。

小程序的代码如下:

<Button 

open-type="launchApp

app-parameter="paymentResult"

@launchapp="handleLaunchAppSuccess"

@error="handleLaunchAppError"

class="return-button" 

:class="{secondary: paymentStatus === 'failed'}">

返回APP

</button>

handleLaunchAppSuccess也获取到了信息,信息如下:

{

"type": "launchapp",

"timeStamp": 12006,

"target": {

"id": "",

"offsetLeft: 11,

"offsetTop": 68,

"dataset": {},

"errno": 0,

"errMsg": "navigateBackApplication:ok"

},

"currentTarget": {

"id": "",

"offsetLeft: 11,

"offsetTop": 68,

"dataset": {}

},

"mark": {},

"detail": {

"errno": 0,

"errMsg": "navigateBackApplication:ok"

},

"mut": false,

"_userTap": false,

"__evName": "launchapp",

"preventDefault": function y() {},

"stopPropagation": function y() {},

"stopImmediatePropagation": function y() {}

}

安卓的manifest也配置了,配置信息如下:

<activity
    android:name=".wxapi.WXEntryActivity"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"
    android:exported="true"
    android:taskAffinity="安卓APP包名"
    android:launchMode="singleTask" />


taskAffinity我使用了正确的安卓包名

请问各位大佬有知道原因的吗,为什么跳转不回来,求指教!


回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容