简体   繁体   中英

how to open browser on android phone from an app on pc using java

I want to open an url on the default browser on android that is connected to a laptop via usb. opening an url and also opening phone settings and else.

It's super simple, all you need is ADB tunnel (correct adb driver installed on your PC as well)

To open a URL in android (default browser)

adb shell am start -a android.intent.action.VIEW -d http://www.stackoverflow.com

To Open settings in android

adb shell am start -a android.settings.SETTINGS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM