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

pullMediaFileListFromCamera returns MEDIA_MANAGER_FETCH_FILE_LIST_FAILED error

Open goggle555 opened this issue 1 year ago • 1 comments

Using pullMediaFileListFromCamera in my project returned an error. Curiously, the test tool in the sample app worked fine.

Error:

ErrorImp{errorType='SDK', errorCode='MEDIA_MANAGER_FETCH_FILE_LIST_FAILED', innerCode='null', description='The execution could not be executed.', hint=''}

My code:

private fun pullMediaFileListFromCamera() {
    MediaDataCenter.getInstance().mediaManager.pullMediaFileListFromCamera(
        PullMediaFileListParam.Builder().mediaFileIndex(-1).count(-1).build(),
        object: CommonCallbacks.CompletionCallback {
            override fun onSuccess() {
                Log.d("pullMediaFileListFromCamera", "_innerMediaFileListState: ${_innerMediaFileListState.value}")
                Log.d("pullMediaFileListFromCamera","Successful")
            }
            override fun onFailure(error: IDJIError) {
                Log.d("pullMediaFileListFromCamera", "_innerMediaFileListState: ${_innerMediaFileListState.value}")
                Log.d("pullMediaFileListFromCamera","Failure: $error")
            }
        }
    )
}

Is there any way to resolve the error?

goggle555 avatar Jan 17 '24 09:01 goggle555

Agent comment from yating.liao in Zendesk ticket #99297:

if you are using the mini 3 series drone? If so, before calling pullMediaFileListFromCamera, you need to call MediaManager.enable to enter playback mode.

°°°

dji-dev avatar Jan 18 '24 08:01 dji-dev