How to find intent parameters?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Posts: 257
Joined: 10 Sep 2013 08:59

How to find intent parameters?

Post by kintrupf » 18 Dec 2016 14:44

I want to intercept a General Broadcast from the Bluetooth beacon app "Beacon Locator" ( ... 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:
I guess the source that sends the intent is ..., 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?

User avatar
Posts: 4454
Joined: 09 Nov 2012 14:23

Re: How to find intent parameters?

Post by Martin » 18 Dec 2016 21:41

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


Post Reply