robotemi / sdk

temi is an unparalleled robotic platform introducing a new dimension of development - movement. Using temi’s SDK, developers can create new functionalities and introduce new use cases via temi’s Android tablet. temi’s movement and navigation capabilities run off of it's Linux computer and uses a set of 16 sensors including a Lidar, depth cameras, driving cameras, and microphones. We encourage our developer community to suggest and request expanded functionality within the SDK and we will adhere to your needs. We want to enable you to create skills like never seen before! We will be constantly improving the SDK and its documentation. Please feel free to reach out to us with any questions or thoughts at developers@robotemi.com
https://www.robotemi.com/
204 stars 87 forks source link

Sequence control with buttons #272

Open Aurumscale opened 2 years ago

Aurumscale commented 2 years ago

Hello!

I want to control the status of a running sequence with buttons. If I press "Pause" button, the sequence pauses, and if I press "Resume" or "Play", the sequence continues where it left off and so on.

I am aware of the controlSequence() function but I have had no success so far. I also do not know how to grant the Selected Kiosk permission. Programming in Java.

Here is what I have so far: btn_play.setOnClickListener(v -> {robot.controlSequence(SequenceCommand.PLAY);}); btn_pause.setOnClickListener(v -> {robot.controlSequence(SequenceCommand.PAUSE);}); btn_stop.setOnClickListener(v -> {robot.controlSequence(SequenceCommand.STOP);});

Thanks.

lcgao commented 2 years ago

Hello, due to the Sequence screen is a kind of floating view so if you want to control sequence by buttons, you should set your button as a floating button as well.

For requesting Selected Kiosk permission, please use Robot.getInstance().requestToBeKioskApp().