Solution 1 :
adb shell am start -a android.intent.action.VIEW -d http://www.facebook.com
Problem :
I am trying to send a commend via ADB to launch different browsers with a given URL.
I only know the package names of the browsers so I used:
adb shell monkey -p com.android.chrome -c android.intent.category.LAUNCHER 1
This way I could open the app with only the package name, but I couldn’t pass any URL to it.
I could pass a URL to chrome using:
adb shell am start -a android.intent.action.VIEW -d https://www.bbc.com/
but this requires more then just package name.
Trying to combine these two didn’t work:
adb shell monkey -p com.android.chrome -c android.intent.category.LAUNCHER 1 -d https://www.yahoo.com
What is the correct way to pass a URL to a browser using only the package name with monkey?
Thank you all!
Comments
Comment posted by Oron Werner
This does not answer the question I asked, and as you can see it’s the same line I used in my second example. Thank you for the try.