Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Android Application Crash when using Camera with NativeScript 6 #83

Closed
jabrware opened this issue Aug 26, 2019 · 0 comments
Closed

Android Application Crash when using Camera with NativeScript 6 #83

jabrware opened this issue Aug 26, 2019 · 0 comments

Comments

@jabrware
Copy link

jabrware commented Aug 26, 2019

Describe the bug
After taking photo and clicking accept in the preview screen then android application crash or restarted. Also during build process there is a warn about deprecated methods in NativeScript 6
Camera_PreviewCallback.java uses or overrides a deprecated API

To Reproduce

  • Upgrade application to NativeScript 6
  • Try to pick a photo using the camera on Android

Expected behavior
Photo should be selected after accepting preview

NativeScript Info(please run tns info):
Component nativescript has 6.0.3 version and is up to date.

Sample Code(please provide minimum code to reproduce problem):

let options: ImagePickerOptions = {
            android: {
                isCaptureMood: false,
                isNeedCamera: true,
                maxNumberFiles: 10,
                isNeedFolderList: true
            }, ios: {
                isCaptureMood: false,
                maxNumberFiles: 10
            }
        };
        let mediafilepicker = new Mediafilepicker();
        mediafilepicker.openImagePicker(options);

        mediafilepicker.on("getFiles", function (res) {
            let results = res.object.get('results');

            if (results) {
                for (let i = 0; i < results.length; i++) {
                    let result = results[i];
                    let file = result.file;
                    console.log(file);
                }
            }});

Additional context
Add any other context about the problem here.

jibon57 added a commit that referenced this issue Sep 23, 2019
@jibon57 jibon57 closed this as completed Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants