murgo / IrssiNotifier

notifies android phones from irc private messages
Apache License 2.0
171 stars 63 forks source link

Send push notifications with high priority #177

Closed scolphoy closed 8 years ago

scolphoy commented 8 years ago

The new Android 6 'doze' power saving mode delays delivery of normal priority push notifications from GCM. A phone that has been sitting on the table without a charger will be in doze mode, and notifiers will be delivered during the next scheduled maintenance round, or the next time the user picks up the device or moves it. Delivering the notifications with high priority will get them delivered immediately even if the device is in doze mode.

https://developers.google.com/cloud-messaging/http-server-ref https://developer.android.com/training/monitoring-device-state/doze-standby.html

IcyMidnight commented 8 years ago

This would be awesome to merge! I've been missing useful notifications because they show up 45 minutes late.

Any chance of a merge/deploy in the near future?

murgo commented 8 years ago

I'll try to get around to it during the weekend :)

On Wed, 17 Feb 2016 21:14 Damien Bargiacchi notifications@github.com wrote:

This would be awesome to merge! I've been missing useful notifications because they show up 45 minutes late.

Any chance of a merge/deploy in the near future?

— Reply to this email directly or view it on GitHub https://github.com/murgo/IrssiNotifier/pull/177#issuecomment-185356345.

IcyMidnight commented 8 years ago

Awesome! :)

murgo commented 8 years ago

This has now been deployed, I'd be glad to hear some feedback if it helps (since I don't have Android 6 yet).

scolphoy commented 8 years ago

Thank you!

A first thing I noticed is that the pushed notifications and notifications downloaded from the server (in IrssiNotifier+) both remain visible, i.e. if both features are on, the app displays a duplicate and leaves it there; I don't remember this happening before today's deployment.

I'll get back to you on the notifier delivery times after I've had a few days to try it out.

IcyMidnight commented 8 years ago

Thanks!

Tested where my phone should have been in doze mode and received the notification in seconds so it looks like it's working :)

Decided today was a good day to upgrade to IrssiNotifier+ ;)

murgo commented 8 years ago

@scolphoy Yeah, that seems to be a real issue. Investigating soon.

murgo commented 8 years ago

Duplicates are now fixed, deploying new version to Google Play soon-ish.

If you're curious: problem wasn't actually related to this issue, but updating the server made Google App Engine Python datastore give saved entities integer_ids like 5073954372845568 which I was parsing as 32 bit ints in the app. Failing to parse the IDs prevented the app from matching pushed and fetched messages together.

scolphoy commented 8 years ago

Great work! Of course, GAE deploys on the latest version of the engine, but doesn't automatically upgrade the engine for an already deployed instance in order to not break stuff. Sounds obvious now, but didn't cross my mind when I tried to figure out the cause earlier. Thanks for fixing the bug, and telling. :)