Mobile-SDK-Android icon indicating copy to clipboard operation
Mobile-SDK-Android copied to clipboard

Cannot customize double press for Mavic Air 2S function button

Open Padreco-lbr opened this issue 2 years ago • 3 comments

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:

  1. Watch Function button state either through DJIKey or RC HardwareStateCallback
  2. Make double press of fn button on RC.
  3. Check results, which may be a single press action or none at all.

Padreco-lbr avatar Aug 12 '22 12:08 Padreco-lbr

The double press function is binded with the DJI FLY app. In MSDK, the HardwareStateCallback design prevent the possibility of double press.

DJI-William avatar Aug 15 '22 06:08 DJI-William

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?

Padreco-lbr avatar Aug 15 '22 11:08 Padreco-lbr

Try setup a listener for RemoteControllerKey.SHOOT_PHOTO_AND_RECORD_BUTTON to see if you can detect the double press.

DJI-William avatar Aug 18 '22 03:08 DJI-William