Simulate a long press with injectKey function

How can I simulate a long press on a device's key?

Currently, I can only send short presses by mobicontrol.device.injectKey(XX).

It seems that there is a way to do it by using ACTION_DOWN and _UP, as it says here: https://developer.android.com/reference/android/view/KeyEvent, but I couldn't figure out how to use it in the MobiControl WebConsole.

2 years ago
Android Scripting
ANSWERS
G
GPMOD@SOTI Bronze Contributor
2 years ago

Hi Tomer,

Thanks for posting on SOTI Pulse.

Can we please understand the use case scenario here, so we can understand the requirement properly? 

Furthermore, I think this function depends on the device manufacturer, so I would request you to reach out to them. 

Can you please provide us below information? 

MobiControl version 

Agent version

Device Manufacturer 

Device OS

Please let us know. 

Thank you. 

Kind regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |