3 ms·
> 1. As you stated, Google forces devs to rely on presence of the Google Play Services Not forcing per se. Google just provides a convenient services that devs
by panpanna 7y ago
> 1. As you stated, Google forces devs to rely on presence of the Google Play Services
Not forcing per se. Google just provides a convenient services that devs are happy to use.
- Macha 7y agoThat time has passed. There's functionality on Android that can only be reliably provided through play services these days (push notifications being the big one).
- panpanna 7y agoYou are correct, but how many applications need push notifications?
- archi42 7y agoIf you've an android phone, just count your apps? I did, and expected 8 of my 20 apps to use GCM. MicroG revealed it to be 11 (actually 12 due to "MicroG services core" registering with GCM as well). I might be an outlier though.
- fulafel 7y agoIt's just an optimization/convenience to use Google services for push notifications, no?
- cameronbrown 7y agoBasically: Back in the day a ton of apps used their own notification servers, with each one clashing, waking the device up, etc.. Google Cloud Messaging was then set to be the only service that could wake the device up when it was sleeping. Supposedly it batches messages and sends them at optimal times to save battery.
- fulafel 7y agoI'm not convinced that other network io is blocked. There seem to even be commercial competition for GCM: https://pushy.me/ https://pushy.me/
- cameronbrown 7y agoIt's not when the device is awake or has a wakelock. But since Android's Doze (basically deep sleep battery saving state) GCM is the only service that can wake it up.
- fulafel 7y agoI thought the device wakes up from Doze regularly, and then you can poll for the notifications. The SDK docs sound this way too: "While the device is in Doze, apps' access to certain battery-intensive resources is deferred until maintenance windows" But it seems these maintenance windows aren't frequent enough (every 15 minutes?) for some apps.
- mflare 7y agoThe minimum interval for periodic jobs is 15 minutes. When the device is in Doze mode, the jobs are defered to the next maintenance window. The longer the device remains in Doze mode, the greater the distance between two maintenance windows. Do you want to use a messenger or any other social media app where the worst case scenario is that it takes 15 minutes for the message to reach the recipient? Certainly not, so the app vendor is forced to use FCM to display notifications immediately even if the recipient's device is in Doze mode.
- maple3142 7y agoNot really. Apps in China are mostly don't need Google Play Service, so it is totally up to developer to decide whether use it or not.
- realusername 7y agoThat's not true anymore, for notifications it's now mandatory.