Skip to content

Commit

Permalink
Merge pull request #869 from hshiraiwa/fix/example-app-cancel-notific…
Browse files Browse the repository at this point in the history
…ation

Fix example app cancel notification
  • Loading branch information
Gp2mv3 authored Oct 8, 2018
2 parents fc5c722 + 83dc15d commit 1143632
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions example/NotifService.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default class NotifService {
}

localNotif() {
this.lastId++;
PushNotification.localNotification({
/* Android Only Properties */
id: ''+this.lastId, // (optional) Valid unique 32 bit integer specified as string. default: Autogenerated Unique ID
Expand Down Expand Up @@ -69,11 +70,10 @@ export default class NotifService {
number: '10', // (optional) Valid 32 bit integer specified as string. default: none (Cannot be zero)
actions: '["Yes", "No"]', // (Android only) See the doc for notification actions to know more
});

this.lastId++;
}

scheduleNotif() {
this.lastId++;
PushNotification.localNotificationSchedule({
date: new Date(Date.now() + (30 * 1000)), // in 30 secs

Expand Down Expand Up @@ -103,8 +103,6 @@ export default class NotifService {
playSound: true, // (optional) default: true
soundName: 'default', // (optional) Sound to play when the notification is shown. Value of 'default' plays the default sound. It can be set to a custom sound such as 'android.resource://com.xyz/raw/my_sound'. It will look for the 'my_sound' audio file in 'res/raw' directory and play it. default: 'default' (default sound is played)
});

this.lastId++;
}

checkPermission(cbk) {
Expand Down

0 comments on commit 1143632

Please sign in to comment.