【发布时间】:2020-07-06 09:41:18
【问题描述】:
我可以从快应用切换到安卓应用吗?怎么操作?
【问题讨论】:
标签: android huawei-mobile-services appgallery
我可以从快应用切换到安卓应用吗?怎么操作?
【问题讨论】:
标签: android huawei-mobile-services appgallery
将外部架构添加到要重定向到的目标应用的 Activity。示例代码如下:
<activity
android:label="@7F070043"
android:name="com.huawei.phoneservice.HelpCenterActivity"
android:exported="true"
android:excludeFromRecents="true"
android:launchMode="2"
android:configChanges="0x40002D84">
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"> </category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="hwphoneservice" android:host="externalapp"></data>
</intent-filter>
</activity>
在快应用中,调用system.router.push接口调用重定向功能。即router.push接口传递上一步配置的schema。
router.push({uri:"hwphoneservice://externalapp/service"})
【讨论】:
很遗憾,目前无法从 QuickApp 项目切换到 Android 项目。我不确定是否计划在不久的将来发布这样的功能,但它肯定是可行的。
【讨论】: