Android Deep Linking with multiple query parameters

后端 未结 4 1963
别跟我提以往
别跟我提以往 2020-12-08 01:49

I\'m trying to deep link my app and have implemented the following in my AndroidManifest.xml to open the proper activity.



        
相关标签:
4条回答
  • 2020-12-08 02:25

    Just encode your url parameters and it will work. It might be google's parsing bug.

    Before:

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

    After:

    adb shell am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key%3Dcategory_parent_id%26value%3D92%26title%3Dtest" com.myApp.android
    
    0 讨论(0)
  • 2020-12-08 02:27

    Just add \ before & sign when testing with adb.

    Copy this:

    adb shell am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key=category_parent_id\&value=92\&title=test" com.myApp.android

    0 讨论(0)
  • 2020-12-08 02:36

    For osx / mac users with android studio

    Load adb

    export PATH="/Users/your_user/Library/Android/sdk/platform-tools":$PATH
    

    Check that the app is recognized

    adb shell am start -n com.package/.activities_package_name.MainActivity
    

    Test deeplink

    adb shell 'am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key=category_parent_id\&value=92\&title=test" com.myApp.android'
    

    Don't forget the ' '

    0 讨论(0)
  • 2020-12-08 02:37

    You can wrap the shell command with simple quotes (to avoid modifying the uri content):

    adb shell 'am start -d "myCustomScheme://myHost?key=category_parent_id&value=92&title=test"'
    
    0 讨论(0)
提交回复
热议问题