【问题标题】:How do I switch from a quick app to an Android app?如何从快应用切换到安卓应用?
【发布时间】:2020-07-06 09:41:18
【问题描述】:

我可以从快应用切换到安卓应用吗?怎么操作?

【问题讨论】:

    标签: android huawei-mobile-services appgallery


    【解决方案1】:
    1. 将外部架构添加到要重定向到的目标应用的 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> 
      
    2. 在快应用中,调用system.router.push接口调用重定向功能。即router.push接口传递上一步配置的schema。

      router.push({uri:"hwphoneservice://externalapp/service"})
      

    【讨论】:

      【解决方案2】:

      很遗憾,目前无法从 QuickApp 项目切换到 Android 项目。我不确定是否计划在不久的将来发布这样的功能,但它肯定是可行的。

      【讨论】:

        猜你喜欢
        • 2012-02-07
        • 1970-01-01
        • 1970-01-01
        • 2017-10-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-07-16
        • 2019-05-30
        相关资源
        最近更新 更多