Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49082

Local notification sound not working

$
0
0

please help me, i don’t why notification not have sound?

this.filePath.resolveNativePath('file://assets/sounds/notifi1.mp3')
    .then(filePath => {
      console.log(filePath);
      this.localNotifications.schedule({
        id: 1,
        title: title,
        text: message,
        led: 'FF0000',
        icon: 'file://assets/icon/favicon.png',
        sound: filePath
      });
    })
    .catch(err => console.log(err));

other code but not working

/ this.localNotifications.schedule({
    //   id: 1,
    //   title: title,
    //   text: message,
    //   led: 'FF0000',
    //   // trigger: { at: new Date(new Date().getTime() + 2000) },
    //   vibrate: true,
    //   foreground: true,
    //   icon: 'file://assets/icon/favicon.png',
    //   smallIcon: 'res://ic_launcher.png',
    //   sound: this.platform.is('android') ? 'file://assets/sounds/notifi_1.mp3' : 'file://assets/sounds/notifi_2.mp3'
    // });

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>