You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
<!-- Devices running Android 12L (API level 32) or lower -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:replace="android:maxSdkVersion" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Devices running Android 13 (API level 33) or higher -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<!-- To handle the reselection within the app on Android 14 (API level 34) -->
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
<uses-permission android:name="android.permission.CAMERA" />
...
When the user opens the camera, a popup asking for permission to access the camera appears, and after the user accepts, they can use the camera. However, when they try to access the gallery (the popup to allow access shows up and it is accepted), I see the following message in the console:
NativeScript-CameraPlus --- [disposeNativeView.]
At this point, the camera closes and nothing happens.
Here is my code:
export function pickImageFromGallery() {
if (!cam) cam = new CameraPlus();
cam.galleryPickerMode = 'single';
if (isAndroid) {
if (!cam.hasStoragePermissions()) {
cam.requestStoragePermissions().then((response: boolean) => {
if (response) {
doPickFromGallery();
}
});
} else {
doPickFromGallery();
}
} else {
doPickFromGallery(); // iOS
}
}
function doPickFromGallery() {
cam.chooseFromLibrary().then((imageAssets: any) => {
console.log('image passed back: ', imageAssets);
... rest of the code
});
}
This happens on a simulator (Pixel 7, API 33) as well as on a physical device (Samsung Note 9, Android 10, API 30).
Any help in resolving this would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Hello, here is my setup:
When the user opens the camera, a popup asking for permission to access the camera appears, and after the user accepts, they can use the camera. However, when they try to access the gallery (the popup to allow access shows up and it is accepted), I see the following message in the console:
At this point, the camera closes and nothing happens.
Here is my code:
This happens on a simulator (Pixel 7, API 33) as well as on a physical device (Samsung Note 9, Android 10, API 30).
Any help in resolving this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: