-
Notifications
You must be signed in to change notification settings - Fork 197
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
Receiving notifications on iOS when app immediately in background #30
Comments
Hello Rob, The notificationOpenedCallback only fires in the following 2 cases.
If you need to do background processing in your app as soon as the notification arrives you will need to set content_available to true on our REST API or enable this option on the dashboard when creating a new message. Enabling this does not fire the callback above, it instead wakes up your app and calls the application:didReceiveRemoteNotification:fetchCompletionHandler: selector. This selector isn't available in Cordova so you will need to write Objective-C or Swift code to handle this. Let us know your use case for doing background work when a notification is received and we can consider adding it as an SDK feature instead of requiring you to write your own native code. Thanks. |
Josh, Let me write something up for you. It’ll take a few days to put Rob On 9 Jan 2016, at 4:46, Josh Kasten wrote:
|
Hey Rob, Just checking in to see if you have more information for us. Feel free to reopen this issue with your reply. Thanks. |
Is there any plan to implement this feature? |
hey @rwillett, i'm currently interested in this use case. Does onesignal go well with phonegap push plugin ? |
We hadn't the time to try and resolve this issue using OneSignal so we used a different provider to get the functionality we needed. We don't use Phonegap push plugin at all, so can't comment. Simon McDonald the author of the push plugin may be able to advise. Rob |
@leizard, OneSignal doesn't work with Phonegap push plugin. |
@leizard Highly interested too on the implementation of In our case, we'd like to use it to wake up the app and periodically get user's location. |
Hi @c990802, I'm using Ionic push and it work really good with phonegap push plugin. But I'm also interested at OneSignal and want to have a try with it. |
@jkasten2 Would it be possible to consider such feature for the cordova sdk? |
It recommend to prevent the notification from going to the device by filtering it instead of trying to keep it from displaying on the device end. This consumes extra battery to wake your device and app so it is best to avoid it if possible. If you do need to do background work with a notification it should be done in native code as starting the Cordova run time each time a notification is received puts extra load on the device. Feel free to list your use cases here and we will see if it possible to support these natively in our SDK. However we have fixed some compatibility issues in the 2.0.8 release of the SDK which means |
Thanks @jkasten2, I'll try 2.0.8 and see if I can use this feature from phonegap-plugin-push, since it's already implemented there. |
Hello @neves! Was this implemented on 2.0.8? I really need this too... to maintain my Badge Updated. Thx, |
Closing this issue due to inactivity. We currently do not support background notification processing in the Cordova SDK because it would require loading the Cordova runtime in the background. We currently recommend that if you want background processing, you should use |
@Nightsd01 can you comment on #416 plz? |
I am unclear if this should be asked here or on the OneSignal website. I have asked on both to be sure. Apologies if I have this wrong and its for the website help team (or vice versa).
I have a question regarding how the OneSignal notification handler responds when the IOS app has moved to background (IOS has not suspended the app yet) AND a content-available =1 notification is sent.
As the IOSapp has been in the the background for only a few minutes (or secs), I would expect the OneSIgnal handler to process the notification (which is simply to log it at the moment). Currently the handler works in foreground but not at all when the app is in the background.
Is this the expected behaviour? Experience with other notification plugins is they keep on working until the IOS app gets suspended which is some variable time that the device determines but can be up to 15 mins or so.
This is with IOS 9.2 and Xcode 7.2, onesignal-cordova-plugin 1.10.1.
Thanks,
Rob
The text was updated successfully, but these errors were encountered: