File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const takePicture = function (options?: CameraOptions): Promise<any> {
32
32
shouldKeepAspectRatio = Utils . isNullOrUndefined ( options . keepAspectRatio ) ? shouldKeepAspectRatio : options . keepAspectRatio ;
33
33
}
34
34
35
- if ( ! api33 ( ) && ! permissions . hasPermission ( android . Manifest . permission . WRITE_EXTERNAL_STORAGE ) ) {
35
+ if ( ! api30 ( ) && ! permissions . hasPermission ( android . Manifest . permission . WRITE_EXTERNAL_STORAGE ) ) {
36
36
saveToGallery = false ;
37
37
}
38
38
@@ -168,12 +168,12 @@ export const isAvailable = function () {
168
168
return Utils . android . getApplicationContext ( ) . getPackageManager ( ) . hasSystemFeature ( android . content . pm . PackageManager . FEATURE_CAMERA ) ;
169
169
} ;
170
170
171
- function api33 ( ) : boolean {
172
- return ( < any > android ) . os . Build . VERSION . SDK_INT >= 33 && Utils . ad . getApplicationContext ( ) . getApplicationInfo ( ) . targetSdkVersion >= 33 ;
171
+ function api30 ( ) : boolean {
172
+ return ( < any > android ) . os . Build . VERSION . SDK_INT >= 30 && Utils . ad . getApplicationContext ( ) . getApplicationInfo ( ) . targetSdkVersion >= 30 ;
173
173
}
174
174
175
175
export const requestPermissions = function ( ) {
176
- if ( api33 ( ) ) {
176
+ if ( api30 ( ) ) {
177
177
return permissions . requestPermissions ( [ android . Manifest . permission . CAMERA ] ) ;
178
178
} else {
179
179
return permissions . requestPermissions ( [ android . Manifest . permission . WRITE_EXTERNAL_STORAGE , android . Manifest . permission . CAMERA ] ) ;
You can’t perform that action at this time.
0 commit comments