I am able to start an activity with adb as below
adb shell am start -a android.intent.action.MAIN -n com.package.name/com.package.name.ActivityName
How do I add intent data to this command so that I can retrieve it from the started activity?
Here is some sample commands :
# 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"
The application With intent allow to send intent.
I found those informations there : http://www.xgouchet.fr/android/index.php?article42/launch-intents-using-adb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With