Mobile-SDK-Android
Mobile-SDK-Android copied to clipboard
Cannot customize double press for Mavic Air 2S function button
Unlike DJI Fly, its not possible to customize actions for a double press in the SDK, since double pressing doesn't trigger any return while watching for function button state, it looks like its being handled by firmware but there is no flag for the user to signal that button has been pressed twice other than once.
Steps to reproduce:
- Watch Function button state either through DJIKey or RC HardwareStateCallback
- Make double press of fn button on RC.
- Check results, which may be a single press action or none at all.
The double press function is binded with the DJI FLY app. In MSDK, the HardwareStateCallback design prevent the possibility of double press.
So you are saying that there is only one customizable button in the controller and only one action can be taken from it? Why not adding the double/long press to the sdk?
Try setup a listener for RemoteControllerKey.SHOOT_PHOTO_AND_RECORD_BUTTON to see if you can detect the double press.