dji-sdk / Mobile-SDK-Android-V5

MSDK V5 Sample
Other
247 stars 126 forks source link

Same code does not work on 300 RTK but works on mini 3 Pro - Record video #361

Open antonymarion opened 3 weeks ago

antonymarion commented 3 weeks ago

Hi Dji,

I get some records (video) on mini 3 Pro with the following code

but on 300 RTK I am getting an error (error code SYSTEM ERROR -7) with no description


    if (CameraKey.KeyIsRecording.create(cameraIndex).get() == true) {
                                    return@run Log.d("INFO", "Camera is already recording")
                                }

                                var callback = object : CommonCallbacks.CompletionCallback {
                                    override fun onSuccess() {
                                        Log.i("VIDEO", "take video success")
                                        ToastUtils.showToast("take video success")
                                    }

                                    override fun onFailure(error: IDJIError) {
                                        Log.e(
                                            "VIDEO",
                                            "take video failed: " + error.description()
                                        )
                                        ToastUtils.showToast("take video failed")
                                    }
                                }

                                flatCameraModule!!.setCameraMode(
                                    DJISDKModel.getInstance(), CameraMode.VIDEO_NORMAL
                                )

                                DJISDKModel.getInstance().performActionWithOutResult(
                                    createKey(
                                        CameraKey.KeyStartRecord, cameraIndex
                                    )
                                )
                                    .subscribe({ CallbackUtils.onSuccess(callback) }) { throwable: Throwable ->
                                        CallbackUtils.onFailure(
                                            callback, (throwable as RxError).djiError
                                        )
                                    }
dji-dev commented 3 weeks ago

Agent comment from Hummels Lei in Zendesk ticket #109110:

Please utilize the createCameraKey method to generate a camera key.

°°°

antonymarion commented 3 weeks ago

I changed with createCameraKey and it does not change anything

Have you tested on a 300 RTK this code?

I replaced the line including the createKeywith

DJISDKModel.getInstance().performActionWithOutResult( createCameraKey( CameraKey.KeyStartRecord, cameraIndex, lensType ) )

and lensType equals the current lens: CAMERA_LENS_ZOOM, or CAMERA_LENS_WIDE, or CAMERA_LENS_THERMAL

By the way, the error description message is still equal to null which does not for troobleshooting...

dji-dev commented 2 weeks ago

Agent comment from Hummels Lei in Zendesk ticket #109110:

Yes, it works well on our end. Would you be able to test this key using our sample code?

°°°

antonymarion commented 2 weeks ago

I will let you know yes using your simple code