mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
EventHandler.onTestNewFunction - add optional `options` Bundle parameter for receiving arguments intent nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION - add optional String extra `address` to specify the MAC address of the target device - add optional Bundle extra `options` to pass arguments to EventHandler.onTestNewFunction - construct a synthetic `options` bundle if the `options` extra is missing but there are `options_...` extras Global setting `Settings / Developer options / Intent API / Allow Debug Command` must be enabled and the device(s) connected for the following examples. Example to trigger onTestNewFunction for all currently connected devices: `adb shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION"` Example to trigger onTestNewFunction for a specific device: `adb shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION" --es address "12:34:56:78:9A:BC" ` Example to trigger onTestNewFunction for a specific device with an option Bundle containing float x=4.2 and integer array y=[1,2,3] extras: `adb.exe shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION" --es address "31:31:43:30:40:07" --ef options_x 4.2 --eia options_y 1,2,3` Extras for some other types can also be specified via command line. See https://developer.android.com/tools/adb#IntentSpec for details.