Created
October 20, 2016 15:23
-
-
Save vilmarbfilho/f2eb160c1a0e0ee9745bbecb82d5139e to your computer and use it in GitHub Desktop.
Broadcast test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [https://xgouchet.fr/android/index.php?article42/launch-intents-using-adb] | |
| # specifying the action and data uri | |
| adb shell am start -a "android.intent.action.VIEW" -d "http://developer.android.com" | |
| # specifying the action, mime type and an extra string | |
| adb shell am start -a "android.intent.action.SEND" --es "android.intent.extra.TEXT" "Hello World" -t "text/plain" | |
| # specifying an explicit component name | |
| adb shell am start -n "com.example.application/.MainActivity" | |
| # specifying an explicit component name | |
| adb shell am startservice -n "com.example.application/.BackgroundService" | |
| # specifying the action | |
| adb shell am broadcast -a "android.intent.action.PACKAGE_FIRST_LAUNCH" -d "com.example.application" | |
| [http://stackoverflow.com/questions/7415997/how-to-start-and-stop-android-service-from-a-adb-shell] | |
| # start a service | |
| adb shell am startservice com.xxx/.service.XXXService |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment