phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

Trying to recieve "speaking" notifications with tts plugin #2894

Open Woean opened 4 years ago

Woean commented 4 years ago

Expected Behaviour

I'm trying to get "speaking" notifications, with the text to speech (tts) plugin:

 push.on('notification', function (data) {

                TTS.speak({
                            text: 'DEMO',
                            locale: 'en-US',
                            rate: 0.75
                        }).then(function () {
                            alert('success');
                        }, function (reason) {
                            alert(reason);
                        });
                }, false);

Actual Behaviour

It works when the app is in the foreground and open, but not in the background. Does anyone have an idea/same problem/solution? Thanks :)