Tôi đang cố gắng liên kết sâu ứng dụng của mình và đã triển khai thực hiện các thao tác sau trong tệp AndroidManifest.xml của mình để mở hoạt động thích hợp.Liên kết sâu Android với nhiều tham số truy vấn
<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>
Và tôi đang thử nghiệm các hoạt động từ adb sử dụng
adb shell am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key=category_parent_id&value=92&title=test" com.myApp.android
Các Hoạt động được mở nhưng URI được truyền cho các hoạt động trong mục đích duy nhất là
myCustomScheme://myHost?key=category_parent_id
của nó bỏ qua mọi thứ sau '&'
Tôi đã tra cứu ở đây trên SO nhưng không tìm bất kỳ thứ gì có nhiều tham số truy vấn.
Mọi trợ giúp sẽ được đánh giá cao. :)
Cảm ơn! làm việc như quyến rũ! –
Niềm vui của tôi !!!! –
Làm việc cho tôi. Có ai biết tại sao bạn cần phải làm điều này? –