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

前端 未结 11 672
孤街浪徒
孤街浪徒 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 10:48

    Your command is incorrect because you are trying with an incorrect package name, Instead of com.myapp.activity.DeepLinkActivity you have to write only the package name specified in build gradle(Module: app) by 'application Id' e.g if your applicationId is com.companyname, then your command would be like this:

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

提交回复
热议问题