Please select Into the mobile phone version | Continue to access the computer ver.
How to make the Mavic 2 Pro - Hardware photo buttons work in the ...
932 5 2020-5-12
Uploading and Loding Picture ...(0/1)
o(^-^)o
DJI_Zoe
lvl.2

United States
Offline

When the SDK support for the Mavic 2 platform was released, developers often wondered what happened with the remote controller buttons to "Take Photo" and "Take Video".  The answer was in the 4.8 Release Notes:
"The implementation of shoot photo button and record video button in MSDK have been removed,
developers need to implement their own function by listening to the press events of Remote Controller
for Mavic Pro and Mavic 2 platforms."


Hope this helps clear up the mystery!

-Zoe
QA Engineer, US R&D
2020-5-12
Use props
MitchRSM
Second Officer
Flight distance : 149534 ft
  • >>>
Italy
Offline

yes, but later in SDK 4.11 was no more need to listening to the press events of Remote Controller cause was added set/getShutterButtonBindingEnabledWithCompletion: and set/getRecordButtonBindingEnabledWithCompletion: both enabled by default
2020-5-12
Use props
hdrpano
Second Officer
Flight distance : 452943 ft
  • >>>
Switzerland
Offline

Swift 5, iOS

I solved the issue with an extension. You can control the RC Hardware State. Use that only for Mavic 2 models. I added the iOS camera sound when we trigger the shootPhoto function.  

extension ViewController: DJIRemoteControllerDelegate {
   
    func remoteController(_ remoteController: DJIRemoteController, didUpdate  state: DJIRCHardwareState) {
        if state.shutterButton.isClicked.boolValue {
            print("Shutter button clicked")
         
            if self.aircraftModel == DJIAircraftModelNameMavic2Enterprise || self.aircraftModel == DJIAircraftModelNameMavic2Pro || self.aircraftModel == DJIAircraftModelNameMavic2Zoom {
                self.shootPhoto()
                AudioServicesPlaySystemSound(SystemSoundID(1108))
            }
        }
    }
}
2020-5-13
Use props
Fish in Water
lvl.2
Flight distance : 541512 ft
China
Offline

That is a good question!
2020-6-2
Use props
djiuser_dPVFlzbbXexg
lvl.2
Japan
Offline


Please help me, I need to use the same function but it's never being called. please note that I am using the DJI Mavic 2 Pro and running it on the simulator! What I am missing here?

func remoteController(_ remoteController: DJIRemoteController, didUpdate  state: DJIRCHardwareState) {
        if state.shutterButton.isClicked.boolValue {
            print("Shutter button clicked")
    }
}
2020-11-26
Use props
wamuBugMe
Second Officer

Ukraine
Offline

Customized software development is not at all a simple task. If the software you have got developed is not right in the 1st go itself, your company can incur huge losses. Thus, it becomes imperative to get customized software developed by a company that is well established and has expertise in their domain. So try to contact with professtionals from Axonim
4-26 06:12
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules