@capacitor/camera 8.2.0 → 8.2.1
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.
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,7 @@ repositories {
|
|
|
75
75
|
dependencies {
|
|
76
76
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
77
77
|
|
|
78
|
-
implementation 'io.ionic.libs:ioncamera-android:1.0.
|
|
78
|
+
implementation 'io.ionic.libs:ioncamera-android:1.0.2'
|
|
79
79
|
|
|
80
80
|
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
81
81
|
implementation "com.capacitorjs:core:$capacitorVersion"
|
|
@@ -270,6 +270,7 @@ public class LegacyCameraFlow {
|
|
|
270
270
|
// TODO: Verify provider config exists
|
|
271
271
|
imageFileUri = FileProvider.getUriForFile(activity, appId + ".fileprovider", photoFile);
|
|
272
272
|
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri);
|
|
273
|
+
takePictureIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
|
273
274
|
} catch (Exception ex) {
|
|
274
275
|
call.reject(IMAGE_FILE_SAVE_ERROR, ex);
|
|
275
276
|
return;
|
|
@@ -543,7 +544,7 @@ public class LegacyCameraFlow {
|
|
|
543
544
|
private File getTempFile(Uri uri) {
|
|
544
545
|
String filename = Uri.parse(Uri.decode(uri.toString())).getLastPathSegment();
|
|
545
546
|
if (!filename.contains(".jpg") && !filename.contains(".jpeg")) {
|
|
546
|
-
filename += "." +
|
|
547
|
+
filename += "." + new java.util.Date().getTime() + ".jpeg";
|
|
547
548
|
}
|
|
548
549
|
File cacheDir = context.getCacheDir();
|
|
549
550
|
return new File(cacheDir, filename);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/camera",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "The Camera API provides the ability to take a photo with the camera or choose an existing one from the photo album.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|