If there's a wifiLock for acquiring wifi and enabling it to work even when the phone goes idle and sleep, is there happened to be a counterpart of it for mobile data access?
You see, everything goes well now if the user is in wifi connection. But somehow, using mobile data access, and when the phone goes idle, it seems to be dropping the connection. Any ideas?
Mobile data does not go to sleep. However, if your socket remains open and unused for a while, it may get shut down. That's why C2DM (and, presumably, GCM) had to send a heartbeat every 30 minutes or so, to make sure the open socket connection to Google's servers remained open.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With