@nativescript/camera
Advanced tools
Comparing version 6.0.0-rc.0 to 6.0.0
@@ -160,8 +160,8 @@ import { Utils, Application, Device, Trace, ImageAsset } from '@nativescript/core'; | ||
if (api30()) { | ||
const hasPerm = await permissions.check('android.permission.CAMERA'); | ||
const hasPerm = await permissions.request('android.permission.CAMERA'); | ||
return hasPerm[1]; | ||
} | ||
else { | ||
const hasPerm1 = await permissions.check('android.permission.WRITE_EXTERNAL_STORAGE'); | ||
const hasPerm2 = await permissions.check('android.permission.CAMERA'); | ||
const hasPerm1 = await permissions.request('android.permission.WRITE_EXTERNAL_STORAGE'); | ||
const hasPerm2 = await permissions.request('android.permission.CAMERA'); | ||
return hasPerm1[1] && hasPerm2[1]; | ||
@@ -171,7 +171,7 @@ } | ||
export async function requestPhotosPermissions() { | ||
const hasPerm = await permissions.check('android.permission.WRITE_EXTERNAL_STORAGE'); | ||
const hasPerm = await permissions.request('android.permission.WRITE_EXTERNAL_STORAGE'); | ||
return hasPerm[1]; | ||
} | ||
export async function requestCameraPermissions() { | ||
const hasPerm = await permissions.check('android.permission.CAMERA'); | ||
const hasPerm = await permissions.request('android.permission.CAMERA'); | ||
return hasPerm[1]; | ||
@@ -178,0 +178,0 @@ } |
{ | ||
"name": "@nativescript/camera", | ||
"version": "6.0.0-rc.0", | ||
"version": "6.0.0", | ||
"description": "Provides API for using device camera", | ||
@@ -5,0 +5,0 @@ "main": "index", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
70368
0