0

I'm trying to send an intent to a BroadcastReceiver that must receive a HashMap<String, String>

Is it possible? I already tryed many types of approaches, without success.

This is what I'm trying:

adb shell am broadcast -a com.example.INTENT_ACTION_NAME --es tag "TAG_NAME" --es data {"details":"value1"\,"type":"value2"\}' --es version "1.3"

Thanks in advance.

Vitor Braga
  • 2,173
  • 1
  • 23
  • 19

1 Answers1

3

Unfortunately it is not possible using am (at the moment).

All command line options that can be parsed by am can be seen in its sources: https://github.com/android/platform_frameworks_base/blob/master/cmds/am/src/com/android/commands/am/Am.java.

You can try to build your own am with such functionality (if it's necessary enough).

Vladimir Petrakovich
  • 4,184
  • 1
  • 30
  • 46