How to play multiple feedback sequences using Intent
Since there is no callback for Intent, it is impossible to react upon a finished sequence to start another one right away.
Intent API allows you to play multiple sequences with one Intent.
intArray is provided as extra
com.proglove.api.extra.FEEDBACK_SEQUENCES_IN_ORDER, the feedback sequences in that array are conducted in that order one after another.
val intent = Intent() intent.setAction("com.proglove.api.PLAY_FEEDBACK") intent.putExtra("com.proglove.api.extra.FEEDBACK_SEQUENCES_IN_ORDER", [4, 4, 4]) sendBroadcast(intent)
When multiple sequences are provided, the extra
com.proglove.api.extra.FEEDBACK_SEQUENCE_ID is ignored.
Besides the above structure, you can also provide a boolean valued extra in
com.proglove.api.extra.REPLACE_QUEUE, which, if set to true, makes this command cancel all currently waiting commands and executes this command as soon as possible.
To learn more, see Queueing behavior.