@nativescript-community/perms
Advanced tools
Comparing version 2.2.11 to 2.2.12
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.2.12](https://github.com/nativescript-community/perms/compare/v2.2.11...v2.2.12) (2022-08-15) | ||
**Note:** Version bump only for package @nativescript-community/perms | ||
## [2.2.11](https://github.com/nativescript-community/perms/compare/v2.2.9...v2.2.11) (2022-07-11) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@nativescript-community/perms", | ||
"version": "2.2.11", | ||
"version": "2.2.12", | ||
"description": "An unified permissions API for NativeScript on iOS and Android.", | ||
@@ -35,3 +35,3 @@ "main": "./permissions", | ||
"readmeFilename": "README.md", | ||
"gitHead": "161c59d9c64098a128453d2ffbdcc8276624beb2" | ||
"gitHead": "89cc875cf5a26dfc97b06a5b0d0bf9f973cb67f9" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Trace } from '@nativescript/core'; | ||
import { Trace, Utils } from '@nativescript/core'; | ||
import { AndroidApplication, android as androidApp } from '@nativescript/core/application'; | ||
@@ -118,3 +118,3 @@ import { getBoolean, setBoolean } from '@nativescript/core/application-settings'; | ||
async function check(permission) { | ||
const context = androidApp.foregroundActivity || androidApp.startActivity; | ||
const context = Utils.android.getApplicationContext(); | ||
let result = true; | ||
@@ -191,3 +191,3 @@ const granted = android.content.pm.PackageManager.PERMISSION_GRANTED; | ||
} | ||
const context = androidApp.foregroundActivity || androidApp.startActivity; | ||
const context = Utils.android.getApplicationContext(); | ||
for (let i = 0; i < permissions.length; i++) { | ||
@@ -194,0 +194,0 @@ const perm = permissions[i]; |
Sorry, the diff of this file is not supported yet
117565