I'm developing an Android app listening for specific intent containing a bundle with some data. I would like to send an intent to my app using adb. I have tried with:
adb shell am startservice -a com.INTENT_NAME -e myBundleName myBundleData com.pkg/com.pkg.cls
but my app recognised it as list of string not as a bundle. Does anyone know how to send intent with bundles using am application? Unfortunately documentation says only about sending lists of string or numbers, nothing about bundle.
According to the source code am
has no way of accepting input data of the bundle
type
Update:
In Android 7.0 the intent parameters parsing code has been moved from Am.java to Intent.java and support for more data types (like Array[]
and ArrayList<>
of basic types) has been added. Unfortunately there is still no support for the Bundle
type extras in am
command.
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