Page 1 of 1

How to find intent parameters?

Posted: 18 Dec 2016 14:44
by kintrupf
I want to intercept a General Broadcast from the Bluetooth beacon app "Beacon Locator" (https://play.google.com/store/apps/deta ... on.locator).

Intercepting the intent (com.somebits.beacon.locator.action.NOTIFY_BEACON_ENTERS_REGION) seems to work (the trigger is executed), but I can't figure out how to get the extra parameter from the intent, which would be needed to distinguish between different beacons.
If I use the "Access Intent Extras" field of the trigger and try something like "value = getString("key")" I only get a java exception.
I suppose I need the proper value for "key" to make it work. Tried all obvious values like "key", "param" etc.

The app itself is open source: https://github.com/vitas/beaconloc.
I guess the source that sends the intent is https://github.com/vitas/beaconloc/blob ... ction.java, but I don't see anything obvious for the name of the parameter. And since I'm no android programmer I don't really know where to look else.

Can anyone help?

Re: How to find intent parameters?

Posted: 18 Dec 2016 21:41
by Martin
The trigger General Broadcast should print the intent extra type, the keys and the values in the log.
After receiving the broadcast by the trigger, open the log and change the log filter to intent bundle to get the result.

The log should look about like this:
... intent bundle String key1=value1, String key2=value2

Regards,
Martin