I am trying to test android deep link urls through adb to launch my app

前端 未结 11 674
孤街浪徒
孤街浪徒 2021-01-30 10:07

When I type the command in adb:

./adb shell am start -W -a android.intent.action.VIEW -d \"example:gizmos\" com.myapp

I get this error:

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 11:00

    Testing deep-linking by running adb shell command seems troublesome to me. So I tried an Easy Solution to reduce my task and time to test deep-linking multiple time using .bat file.

    Step 1: First create a .txt file and paste here your ADB command -

    adb shell am start -W -an android.intent.action.VIEW -d  
    

    and save the file changing .txt extension into .bat. Now you have just created your bat file to test deeplink. Try to use just one letter to name the bat file (Like I named d.bat , "d" for "deeplinking" for easy understanding) because it reduce your time of typing.

    Step 2: Now open your terminal in Android studio and go to your bat file location and just type your file name (without extension) and press enter. For example cd your/bat/file/location/d here suppose "d" is your bat file name.

    It will work spiffy!

提交回复
热议问题