Android 8 forces FOSS apps to use Firebase for push notifications or label them as “using too much battery”

Recently, Google imposed background limitations on the Android 8.0 (API level 26) for what apps can do while running in the background. Per this new update, Android 8 forces developers to use Firebase for their push notifications, or otherwise tell the user that the app has misbehaved. Push notifications are needed by all messaging apps such as Telegram-FOSS, riot.im, and other FOSS apps The problem here is that the Firebase Android client library is not open source. FOSS apps now cannot keep push notification features in Android 8 while also remaining 100% open source and not being stigmatized as misbehaved..

Google official reason for putting this limitation is to improve the user experience. They state that when many Android apps and services are run simultaneously, it places a load on the system. Further if additional apps or services, run in the background, it places an additional load on the system, which could result in a poor user experience. For example, when a user is playing a game in one window while browsing the web in another window, and using a third app to play music, this could result in abrupt shut down of one of the apps, due to immense load on the system.

What are the Background Service limitations?

Google has mentioned that under certain circumstances, a background app is placed on a temporary whitelist for several minutes. While an app is on the whitelist, it can launch services without limitation, and its background services are permitted to run. An app is placed on the whitelist when it handles a task that’s visible to the user, such as:

Handling a high-priority Firebase Cloud Messaging (FCM) message.

Receiving a broadcast, such as an SMS/MMS message.

Executing a PendingIntent from a notification.

Starting a VpnService before the VPN app promotes itself to the foreground.

Prior to Android 8.0, the usual way to create a foreground service was to create a background service, then promote that service to the foreground. From Android 8.0, the system will not allow a background app to create a background service.

This means that all apps on Android will now be forced to use its use Google’s proprietary service, Firebase for push notifications. Since apps like Telegram-FOSS, riot.im, and other Free and Open source software apps cannot use the service, these apps are being reported to the user as ‘using too much battery’.

Telegram-FOSS team has notified its users

The Telegram-FOSS team has now notified its users that since they cant use “Google’s push messaging in a FOSS app”, it will show a notification to users, to keep the background service running, else the users will not be notified about new messages. If the app would set the notification to lower priority (such as hiding it in the lower part of the notification screen), users would immediately get a system notification about Telegram “using battery”, which is confusing and is the reason for this not being the default.

The Telegram-FOSS team has also claimed that “Despite Google’s misleading warnings, there is no difference in battery usage between v4.6 in “true background” and v4.9+ with notification.”

This news has received varied reaction from users. Some are being extremely critical about Google.

A user on Reddit says that “Google is probably regretting that they made Android open source. They will fight tooth and nail to undo that.”

Another user on Hacker News adds, “Google is one of the most evil companies out there for a company that started out with don’t be evil. The have some very smart people, some amazing tech, but unfortunately they have some very evil people working for them help bent on maintaining their advantage by any means necessary. Without using Google’s push notifications, you are going to end up with something that works about 75% of the time. When this first started happening to me, I lost tons of time thinking it was a bug only to finally realize I needed to use Google’s library to get reliability for what once worked.”

Some users have pointed out that Apple has been restricting push notifications from a long time allowing apps to use nothing but APNS, run nothing in background or even include GPL source code.

Another user comments, “The difference is Apple has been the same from the beginning. There was no bait and switch. People who bought Apple products knew what Apple was and will be and what the terms were. With Google there is a bait and switch. They came to market defining themselves as the open alternative to Apple to get market share and developer interest, and now that they’ve achieved dominance the terms are changing. There’s no surprise that there’s going to be massive pushback (and probably antitrust implications)”

Another user suggested that it’s better to opt for non-Android phones.

#FOSS apps that need push notifications get problems: Google wants to force all apps on #Android to use its proprietary service Firebase for push notifications.That's why we need F-Droid and/or #Linux based smartphone OS without Google. #UBportshttps://t.co/RG9K6XTKwt

Few believe that Google is taking this measure clearly to counter iOS phones in the market.

A user on Hacker News says that, “The competition in this case is Apples iOS, for which even HackerNews users love to harp over and over and over again how amazing it is and how little battery it uses because it doesn’t allow apps to use anything but APNS, run anything in background or even include GPL source code. This is what’s Android competing against – a completely locked down operating system which cannot deliver any kind of GPL code. And every time it allows more freedom to developers it’s punished in the market by losing against iOS and mocked on this very website about how it allows their app developers to drain battery and access data. What exactly do you expect Google to do here?”

Seeing the backlash, Google may relax its Firebase licensing or change the rules about background apps in the future. For now though, the FOSS apps will have to resort to guiding users to lower the priority of the resulting notification and the battery warning.