capacitor-camera-module 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -303,10 +303,16 @@ public class CameraModulePlugin extends Plugin {
303
303
  call.resolve(ret);
304
304
  }
305
305
 
306
+
306
307
  @PluginMethod
307
308
  public void pickImageBase64(PluginCall call) {
308
309
 
309
- if (getPermissionState("gallery") != PermissionState.GRANTED) {
310
+ String alias =
311
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
312
+ ? "gallery_13"
313
+ : "gallery_pre13";
314
+
315
+ if (getPermissionState(alias) != PermissionState.GRANTED) {
310
316
  call.reject("Gallery permission not granted");
311
317
  return;
312
318
  }
@@ -323,6 +329,7 @@ public class CameraModulePlugin extends Plugin {
323
329
  }
324
330
 
325
331
 
332
+
326
333
  private String uriToBase64(Uri uri) throws Exception {
327
334
  InputStream inputStream =
328
335
  getContext().getContentResolver().openInputStream(uri);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-camera-module",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Plugin to request permissiones view camera take phots",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",