Skip to content

Set cameraMode failed Execution of this process has timed out #8

@Asendo316

Description

@Asendo316

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions