相关疑难解决方法(0)

Android深度链接具有多个查询参数

我正在尝试深层链接我的应用程序,并在我的AndroidManifest.xml中实现了以下内容以打开正确的活动.

<activity
    android:name=".ui.activities.MyActivity"
    android:label="@string/title_activity"
    android:screenOrientation="portrait">
    <!-- ATTENTION: This intent was auto-generated. Follow instructions at
    https://g.co/AppIndexing/AndroidStudio to publish your Android app deep links. -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- ATTENTION: This data URL was auto-generated. We recommend that you use the HTTP scheme.
        TODO: Change the host or pathPrefix as necessary. -->
        <data
            android:host="myHost"
            android:scheme="myCustomScheme" />
    </intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)

我正在使用adb测试活动

adb shell am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key=category_parent_id&value=92&title=test" com.myApp.android
Run Code Online (Sandbox Code Playgroud)

Activity正在打开,但只传递给intent中活动的URI

myCustomScheme://myHost?key=category_parent_id
Run Code Online (Sandbox Code Playgroud)

它在"&"后跳过一切

我确实在SO上查找但没有找到任何有多个查询参数的东西.

任何帮助,将不胜感激.:)

android deep-linking adb

44
推荐指数
2
解决办法
2万
查看次数

标签 统计

adb ×1

android ×1

deep-linking ×1