I am trying to pass arbitrary data to BroadcastReceiver through its Intent .
So I can do something like the following
intent.putExtra("Some boolean", false); intent.putExtra("Some char", 'a'); intent.putExtra("Some String", "But don't know what it will be"); intent.putExtra("Some long", 15134234124125);
And then pass it to BroadcastReceiver
I want to iterate through Intent.getExtras() with something like keySet() , but I would also like to be able to get the key value without having to hard call the methods like .getStringExtra() or .getBooleanExtra() .
How does a person do this?
android android-intent broadcastreceiver
styler1972
source share