-
Notifications
You must be signed in to change notification settings - Fork 34
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 not received when app is closed. #39
Comments
Can you try upgrading both Titanium SDK to 6.0.0.GA and ti.goosh to version 2.0? We may have fixed the problem in this version. If it persists let us know and we'll look at it thoroughly |
Hello progress44, thanks for your response. I have updated my SDK to 6.0.1 and also the ti.goosh library to the 2.0.0. The same problem happens. Just a note, my phone has the Google Play Services 10.0.84 but, every time I compile the app with ti.goosh, i read the following error on the console: [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. This may be related to the main issue? Also, when I use other code (Ti.cloudpush ... ) when i close the app and send a push notification throught ACS API, the notification is not received but i get the next message in the console: [WARN] : W/GCM-DMM (22054): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=d2app.idisc.es (has extras) } I do not receive this warning in ti.goosh code but I think that the problem is the same. I have also, with ti.cloudpush, receive the "GooglePlayServicesUtil: The Google Play services resources were not found..." This does not happens with all devices, but in some yes. A device which this behaviour happens is a Huawei P9 (marshmallow 6.0.0), a device which does not happens is a BQ Aquaris E5 (Android 5.0.0) Anyone can help me to solve it? Thanks! |
I'll work on the module next week and I'll test this behaviour although I'm guessing it may be a permissions limit on the OS side. Try checking the settings and see if there are any particular permissions you need to enable for the app. |
Right now I have tested the same code, same SDK (6.0.0) same ti.goosh version (2.0.0) in a Samsung Galaxy S7 Edge and everything works as expected. The push notification is received when the app is closed, opened or in the background. But I have also received the error: GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. Like the other device Huawei P9. Thanks progress44 for your quick response and awesome job. If you need more info, please tell me and I will send you as many info you need. Thanks! |
You can ignore the error message |
Thanks! We'll look into it. |
Hello Progress44, late yesterday my customer send a example list of a devices which didn't receive a push notification. Most of the devices are Huawei. I google it and I found several articles with this error. Huawei has a option called "Protected Apps". If an app is not a protected app, when the app is closed, Huawei closes the listener for this app and the notification is rejected by the phone. So, when i put my app to a protected app, the push notification was received even the app is closed. http://www.androidheadlines.com/2016/01/how-to-fix-missing-notifications-on-huawei-phones.html Thanks for your big support! I will test it a little more and find a way to integrate it with ti.map and other modules I need for my app. Thanks again! Best Regards, Pau. |
@argum Thanks for letting us know of this. It's really helpful to us as well. In the repo you can find out how to make it work with ti.map as well. |
Hello to all! First I want to thank you for this awesome module. It works better than ACS API and ArrowDB!
Second, I have a problem with a Android 6.0.0 device (Huawei P9) and:
Titanium SDK : 5.5.1
ti.goosh : 1.6.2
I send a push notification through FCM api:
$url = 'https://fcm.googleapis.com/fcm/send';
When the app is opened or in background, the notification are received as expected, but when I close the app (killed from multitasking window) and send a notification again, FCM return success: 1 (as expected) but the notification banner never appears in the phone.
Am I doing anything wrong? My app code is really easy, is the same as your example in the module :)
var TiGoosh = require('ti.goosh');
TiGoosh.registerForPushNotifications({
});
Thanks again for your awesome job!
Pau.
The text was updated successfully, but these errors were encountered: