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.
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
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):
Additional context Add any other context about the problem here.