Hacker News new | ask | show | jobs
by craftyguy 2845 days ago
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?

4 comments

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).