Hacker News new | ask | show | jobs
by snipem 2842 days ago
Another difficulty was caused by the Doze mode, introduced in Android M. The Doze, which is turned on after a period of inactivity, among other things prevents background processes to access the network. As you can imagine, this prevents our app from receiving notifications.

We mitigate this problem by asking users to make an exemption from battery optimisations for our app. It worked fairly well.

This is why we were migrating to FCM from our own custom built MQTT solution that was invented back in 2012.

1 comments

MQTT still requires a network connection to publish to (or receive subscription events from) a MQTT server.. so you still have the exact same problem with Doze preventing that. What are you doing to get around that problem, if not exempting your app from battery 'optimisations' ?

Edit: Would anyone care to explain how I am wrong in addition to downvoting me? If Doze blocks network connections to your app when it is backgrounded, how can it receive MQTT events?

With every release Android makes it harder to have a service running in the background. With the introduction of doze there is no alternative to using FCM. FCM has a privileged service where it is able to wake up the device from doze. A custom push service will never be able to do this.

There might be hacks, but I'd rather take Googles approach than to work around on each and every release.

All of the 4 major LTE cellular carriers operate IPv6 only networks with NATed IPv4 access tunneled in as an unsupported afterthought.

Having done quite a bit of testing with IPv6 enabled VOIP for inbound calls as compared to FCM with calls coming from an IPv4 only server, only the former setup would reliably get calls to my device on the first ring.

GP knows that. They said they're migrating away from MQTT, to the Google solution.
Ah, somehow I missed that :(
They are saying that they had to use FCM because MQTT was killed by Doze (i.e. the same you are saying).