Send variables to Kustom via Broadcast
Send variables to Kustom via Broadcast #
Kustom from version 2.09 allows third party apps to send variables via broadcasts. In order to send a broadcast to Kustom you will need this static entries defined in your code:
public static final String KUSTOM_ACTION = "org.kustom.action.SEND_VAR";
public static final String KUSTOM_ACTION_EXT_NAME = "org.kustom.action.EXT_NAME";
public static final String KUSTOM_ACTION_VAR_NAME = "org.kustom.action.VAR_NAME";
public static final String KUSTOM_ACTION_VAR_VALUE = "org.kustom.action.VAR_VALUE";
public static final String KUSTOM_ACTION_VAR_NAME_ARRAY = "org.kustom.action.VAR_NAME_ARRAY";
public static final String KUSTOM_ACTION_VAR_VALUE_ARRAY = "org.kustom.action.VAR_VALUE_ARRAY";
Then you will need to send a broadcast always providing an “EXT_NAME” and then providing either a single name/value pair or an array of them. So, for example, if we have an application called “foo” that wants to send “myvar” with value “myvalue” you will do something like this: