Mobile-SDK-Android-V5
Mobile-SDK-Android-V5 copied to clipboard
pullMediaFileListFromCamera returns MEDIA_MANAGER_FETCH_FILE_LIST_FAILED error
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?
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.
°°°