You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
@@ -35,14 +35,14 @@ export default class NotifService {
35
35
/* iOS and Android properties */
36
36
title: 'Local Notification',// (optional)
37
37
message: 'My Notification Message',// (required)
38
-
playSound: false,// (optional) default: true
39
-
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)
soundName: soundName ? 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)
40
40
number: 10,// (optional) Valid 32 bit integer specified as string. default: none (Cannot be zero)
41
41
actions: '["Yes", "No"]',// (Android only) See the doc for notification actions to know more
42
42
});
43
43
}
44
44
45
-
scheduleNotif(){
45
+
scheduleNotif(soundName){
46
46
this.lastId++;
47
47
PushNotification.localNotificationSchedule({
48
48
date: newDate(Date.now()+30*1000),// in 30 secs
@@ -70,8 +70,8 @@ export default class NotifService {
70
70
/* iOS and Android properties */
71
71
title: 'Scheduled Notification',// (optional)
72
72
message: 'My Notification Message',// (required)
73
-
playSound: true,// (optional) default: true
74
-
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)
soundName: soundName ? 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)
0 commit comments