-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Im trying to fetch media files from the drone using the same exact source code from this repository but been getting a timeout error on set camera mode execution.
this is my initMediaManager function
`public void initMediaManager() {
if (AirSmatDJISDKIntegrationApplication.getProductInstance() == null) {
refreshGallery.setRefreshing(false);
mediaFileList.clear();
mListAdapter.notifyDataSetChanged();
connectDroneError.setVisibility(View.VISIBLE);
emptyImagesList.setText("Drone Disconnected");
DJILog.e(TAG, "Product disconnected");
return;
} else {
if (null != AirSmatDJISDKIntegrationApplication.getCameraInstance() && AirSmatDJISDKIntegrationApplication.getCameraInstance().isMediaDownloadModeSupported()) {
mMediaManager = AirSmatDJISDKIntegrationApplication.getCameraInstance().getMediaManager();
if (null != mMediaManager) {
mMediaManager.addUpdateFileListStateListener(this.updateFileListStateListener);
mMediaManager.addMediaUpdatedVideoPlaybackStateListener(this.updatedVideoPlaybackStateListener);
AirSmatDJISDKIntegrationApplication.getCameraInstance().setMode(SettingsDefinitions.CameraMode.MEDIA_DOWNLOAD, error -> {
if (error == null) {
DJILog.e(TAG, "Set cameraMode success");
// connectDroneError.setVisibility(View.GONE);
//refreshGallery.setRefreshing(false);
showProgressDialog();
getFileList();
} else {
setResultToToast("Set cameraMode failed");
DJILog.e(TAG, "Set cameraMode failed "+ error);
}
});
if (mMediaManager.isVideoPlaybackSupported()) {
DJILog.e(TAG, "Camera support video playback!");
} else {
setResultToToast("Camera does not support video playback!");
}
scheduler = mMediaManager.getScheduler();
}
} else if (null != AirSmatDJISDKIntegrationApplication.getCameraInstance()
&& !AirSmatDJISDKIntegrationApplication.getCameraInstance().isMediaDownloadModeSupported()) {
setResultToToast("Media Download Mode not Supported");
}
}
return;
}
`
What to do please ?
Metadata
Metadata
Assignees
Labels
No labels