Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example app cancel notification #869

Merged
merged 1 commit into from
Oct 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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