Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 10 select video return path error #573

Closed
3 tasks done
ztj1993 opened this issue Mar 22, 2020 · 4 comments · Fixed by #585
Closed
3 tasks done

Android 10 select video return path error #573

ztj1993 opened this issue Mar 22, 2020 · 4 comments · Fixed by #585

Comments

@ztj1993
Copy link

ztj1993 commented Mar 22, 2020

Bug Report

Android 10 select video return path error.
I tested OK on Android 8.

Problem

android 10

What is expected to happen?

I/chromium: [INFO:CONSOLE(67)] "/storage/emulated/0/DCIM/Camera/VID_20200322_153048.mp4",

What does actually happen?

D/CameraLauncher: File location is: null
W/ContentResolver: Failed to get type for: content://com.google.android.apps.photos.contentprovider/-1/2/content%3A%2F%2Fmedia%2Fexternal%2Fvideo%2Fmedia%2F28/ORIGINAL/NONE/1039573866 (Invalid column latitude)

Information

Command or Code

        navigator.camera.getPicture(function (videoURI) {
            console.log(videoURI);
            alert(videoURI);
        }, function (message) {
            console.log('Failed because: ' + message);
        }, {
            mediaType: Camera.MediaType.VIDEO,
            destinationType: Camera.DestinationType.NATIVE_URI,
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
        });

or

Camera.DestinationType.FILE_URI

Environment, Platform, Device

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@ztj1993 ztj1993 changed the title Android 10 select video return address error Android 10 select video return path error Mar 23, 2020
@tmk1991
Copy link

tmk1991 commented Apr 1, 2020

Similar issue using the following in android 10:

    const options: CameraOptions = {
      quality: 40,
      targetHeight: 1000,
      targetWidth: 1000,
      correctOrientation: true,
      allowEdit: true,
      destinationType: this.camera.DestinationType.FILE_URI,
      sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
      mediaType: this.camera.MediaType.ALLMEDIA
    };

Returns undefined with FILE_URI. Changing to DATA_URL works. Would prefer to use FILE_URI.

@tmk1991
Copy link

tmk1991 commented Apr 1, 2020

@ztj1993 - did you resolve?

@ztj1993
Copy link
Author

ztj1993 commented Apr 1, 2020

@tmk1991 No

@tmk1991
Copy link

tmk1991 commented Apr 5, 2020

I've made changes to my fork for existing iOS and Android OS updates.
https://github.com/TDTECHLINK/cordova-plugin-camera

Remove the plugin and then add back via git repo
cordova plugin add git+https://github.com/TDTECHLINK/cordova-plugin-camera.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants