Skip to content

Commit 004ccd6

Browse files
Can't enable by method requestPermission notifications on android. #177
1 parent ca0f76e commit 004ccd6

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# NativeScript Local Notifications Plugin
22

3-
[![Build Status][build-status]][build-url]
43
[![NPM version][npm-image]][npm-url]
54
[![Downloads][downloads-image]][npm-url]
65
[![Twitter Follow][twitter-image]][twitter-url]

src/local-notifications.android.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
8989
requestPermission(): Promise<boolean> {
9090
return new Promise((resolve, reject) => {
9191
try {
92-
// AFAIK can't do it on this platform
93-
resolve(true);
92+
// AFAIK can't do it on this platform.. when 'false' is returned, the app could prompt the user to manually enable them in the Device Settings
93+
resolve(LocalNotificationsImpl.hasPermission());
9494
} catch (ex) {
9595
console.log("Error in LocalNotifications.requestPermission: " + ex);
9696
reject(ex);

src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-local-notifications",
3-
"version": "4.1.0",
3+
"version": "4.1.1",
44
"description": "The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.",
55
"main": "local-notifications",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)