@nativescript-community/perms
Advanced tools
Comparing version 2.2.6 to 2.2.7
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.2.7](https://github.com/nativescript-community/perms/compare/v2.2.6...v2.2.7) (2022-03-08) | ||
**Note:** Version bump only for package @nativescript-community/perms | ||
## [2.2.6](https://github.com/nativescript-community/perms/compare/v2.2.5...v2.2.6) (2022-03-08) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@nativescript-community/perms", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"description": "An unified permissions API for NativeScript on iOS and Android.", | ||
@@ -35,3 +35,3 @@ "main": "./permissions", | ||
"readmeFilename": "README.md", | ||
"gitHead": "e671e2dced1aea2996df3c75c4d549bd3f3dacde" | ||
"gitHead": "3a575acaf9972477a9a764f9b0ee452f49d666c1" | ||
} |
@@ -21,7 +21,11 @@ import { Trace } from '@nativescript/core'; | ||
case 'location': { | ||
const result = [android.Manifest.permission.ACCESS_FINE_LOCATION]; | ||
const result = []; | ||
const coarse = options && options.coarse; | ||
const precise = options && options.precise; | ||
if (coarse !== false) { | ||
result.push(android.Manifest.permission.ACCESS_COARSE_LOCATION); | ||
} | ||
if (precise !== false) { | ||
result.push(android.Manifest.permission.ACCESS_FINE_LOCATION); | ||
} | ||
if (getAndroidSDK() >= ANDROIDQ) { | ||
@@ -28,0 +32,0 @@ const type = typeof options === 'string' ? options : options && options.type; |
@@ -37,2 +37,3 @@ export type Status = 'authorized' | 'denied' | 'limited' | 'restricted' | 'undetermined'; | ||
coarce?: boolean; | ||
precise?: boolean; | ||
} | ||
@@ -39,0 +40,0 @@ export interface StorageOptions { |
Sorry, the diff of this file is not supported yet
116929
1286