@nativescript-community/perms
Advanced tools
Comparing version 2.2.18 to 2.2.19
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.2.19](https://github.com/nativescript-community/perms/compare/v2.2.18...v2.2.19) (2022-11-29) | ||
**Note:** Version bump only for package @nativescript-community/perms | ||
## [2.2.18](https://github.com/nativescript-community/perms/compare/v2.2.17...v2.2.18) (2022-11-29) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@nativescript-community/perms", | ||
"version": "2.2.18", | ||
"version": "2.2.19", | ||
"description": "An unified permissions API for NativeScript on iOS and Android.", | ||
@@ -35,3 +35,3 @@ "main": "./permissions", | ||
"readmeFilename": "README.md", | ||
"gitHead": "00852b457e6a6679ea2f004674716f78d9aa2587" | ||
"gitHead": "d68adcc038b07a11bb9a27aa57eb217b69675dfb" | ||
} |
@@ -105,3 +105,3 @@ import { Trace, Utils } from '@nativescript/core'; | ||
if (getAndroidSDK() >= ANDROID13) { | ||
return [android.Manifest.permission.POST_NOTIFICATIONS]; | ||
return ['android.permission.POST_NOTIFICATIONS']; | ||
} | ||
@@ -189,4 +189,5 @@ break; | ||
activity.requestPermissions(permissionsToCheck, requestCode); | ||
androidApp.on(AndroidApplication.activityRequestPermissionsEvent, (args) => { | ||
const onActivityResult = (args) => { | ||
if (args.requestCode === requestCode) { | ||
androidApp.off(AndroidApplication.activityRequestPermissionsEvent, onActivityResult); | ||
const results = args.grantResults; | ||
@@ -212,3 +213,4 @@ if (Trace.isEnabled()) { | ||
} | ||
}); | ||
}; | ||
androidApp.on(AndroidApplication.activityRequestPermissionsEvent, onActivityResult); | ||
} | ||
@@ -215,0 +217,0 @@ catch (e) { |
Sorry, the diff of this file is not supported yet
117944
1255