-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Notification works only if the app is active #1283
Comments
Fill out #1188 as not enough information here. You've not mentioned phones, what you are trying to do, what works, what the code looks like. |
updated |
You still haven't actually provided enough information, e.g. IOS, Android, version of mobile OS, what you expect to happen. Any errors. The reason for the template is to avoid all this back and forth asking for more info as people don't provide enough information. Saying plugin is the latest is meaningless as people often use what they think is the latest plugin, and it turns out to be an old one. You have no date as to when you schedule the plugin. When do you expect it to fire? There are simple examples in the docs. Have you followed them? |
hey , more info about my environment: using plugin version 0.8.4: i wan't it to fire immediately with no schedule. thanks, Roby (-: |
hey, i found it! sorry 'bout the inconvenience and many many thanks for your help and service great weekend! |
Issue : Notification works only if the app is active
plugin link: https://github.com/katzer/cordova-plugin-local-notifications
I'm using an hybrid app cordova with jquery mobile and signalR.
When the app is active (in the foreground) it works perfectly but once i move to other app or hide the apps all together it doesn't work.
I also added a jquery mobile popup to confirm that the issue is not signalR related and the pop up was shown
platforms:
What I did to solve :
Error : nothing happens when app is on the background, all working perfectly when app is on the foreground
Example code :
function onDeviceReady() {
cordova.plugins.notification.local.registerPermission(function (granted) {
console.log('Permission has been granted: ' + granted);
});
};
function onNotificationReceived(notification) {
// show popup
var body = notification.senderInfo + " " + notification.body;
$('#popup-notification').first('p').html(body).end().popup('open');
}
Thanks.
Roby.
The text was updated successfully, but these errors were encountered: