Locally stored upstream flows when the network is disconnected are not sent to the network on JB and ICS (they reboot)

Here is my script.

When the network is disconnected, the GCM client locally saves messages from the device to the cloud (upstream) in a local queue (the length seems to be 20, although not specified).

When this queue is full, messages are discarded locally, and the intent contains the type of message MESSAGE_TYPE_SEND_ERROR+ add-on that messageId was deleted about, and error=TooManyMessages.

Using the gcm.send TTL'd version allows forcibly to reject upstream flows (when the network is disconnected) instead of the queue (message type MESSAGE_TYPE_SEND_ERROR+ add-ons about which messageId was deleted, and error=SERVICE_NOT_AVAILABLE), which I don’t want.

So far so good. The problem is that on JB (4.1.2 and 4.2.2) and ICS (4.0.4) messages in the queue are not sent when the network is disconnected when the network is working again. Rebooting forces them to send. And even worse, when the queue is full, messages can no longer be sent even when the network is running. Here, a reboot is required again. It seems that the "flash" is missing somewhere.

This works great on KK 4.4.2

On all test devices, the APK for Google Play is updated.

Can someone confirm this behavior in JB and ICS and possibly in a different version? Is there a workaround? Thank.

+4
source share
1 answer

The latest update from Google solved the problem.

, , .

+1

Source: https://habr.com/ru/post/1531884/


All Articles