katzer / cordova-plugin-background-mode

Keep app running in background
Apache License 2.0
1.38k stars 1.02k forks source link

doesn't work with phonegap-plugin-push #362

Open mmagdy-sigma opened 6 years ago

mmagdy-sigma commented 6 years ago

when I receive a notification through phonegap my android app starts in background but when I try to move it to foreground with this plugin nothing happens.

pushObject.on('notification').subscribe((notification: any) => {
        console.log('Received a notification', notification);
        this.backgroundMode.moveToForeground();
});

it works as it's supposed outside phonegap but when phonegap is the one who puts my app in background, it cannot be moved to foreground with this plugin.

giovannefeitosa commented 6 years ago

Same here...

Also, can you receive notifications when your app is closed? (not in background) (Android)

I can't. So I am trying to use this plugin and put this pushObject.on('notification') after activate event, but no success...

EugeneSnihovsky commented 6 years ago

Have same issue. When I try to check application state with this._background.isActive() when app launched from received voip notification - it not work. Does anyone has a solution?

McSam94 commented 5 years ago

Hi guys, any update on this issues? I'm stuck here...