Live data from Hacker News

Android now forces apps to include proprietary code for push notifications

reddit.com

71–80 of 284 posts

Re: Android now forces apps to include proprietary code for push notifications

#71

Earlier quoted context omitted.

I was using clean LineageOS for over 2 years, recently switching to LineageOS+microG. I'm using APKPure and F-Droid for apps, Chrome for browsing (as in Firefox, last time I checked, one tap separates you from losing all open tabs). Some apps refuse to work or break (e.g. Bitwarden does not sync), some have degraded functionality (e.g. WhatsApp sometimes does not ring when someone is calling you), many are just spamm…

I’m surprised Chrome runs without Google Play Services.

It does complain about them on the first launch (when the setup screen tries to sign you in for synchronization), but works perfectly after that. I was a bit surprised too. Now, my Chrome installation has been moved between 5 devices (via Titanium Backup) and still works.

The only big inconvenience is getting bookmarks to PC. There is XML file in /data/data/com.android.chrome called Bookmarks (by the way, Chrome seems to be the only Google app in com.android namespace). I just use regex to select the lines with URLs.

Re: Android now forces apps to include proprietary code for push notifications

#72
post #53
post #51

So to summarize, to save battery all notifications on Android (since two versions ago) have to go through a single notification service (rather than each app having the option of continuously running in the background and maintaining a connection with its own notification service). Recently Google killed their GCM notifications service in favor of Firebase Cloud Messaging, which (unlike GCM) unfortunately doesn't hav…

> Are they saying that an application running continuously in the background uses the same amount of battery as an application that's not running at all? A single application running in the background probably uses only a small amount of extra power compared to the notification service alone. However, a couple dozen applications -- all running in the background in order to enable notifications -- probably consume a l…

There's also a wide variety of possible implementations of a notification service, and not all of them will necessarily be as power efficient as what Telegram-FOSS does.

Re: Android now forces apps to include proprietary code for push notifications

#73

Earlier quoted context omitted.

Hi. Nobody said they are the friends here. Just that Google is not.

In this case I guess there are no friends, only enemies?

Rank the enemies since op avoided that.

Since things are not black and white, it should be reasonable to differentiate between Apple, Google, and Microsoft.

Re: Android now forces apps to include proprietary code for push notifications

#74

Earlier quoted context omitted.

I have a thing I’m writing that will go into more detail, but in short Telegram’s client applications (which are licensed under various incarnations of the GPL) are updated frequently while the source code in their publicly available repositories lags far behind. In addition, they use a number of open source libraries that at the very least require attribution, but Telegram does not follow their terms.

> while the source code in their publicly available repositories lags far behind I don't think this violates GPL. GPL requires you to be able to receive the source if you want to, not that it be on an online repository. You might have to request it and have it sent to you.

If they are going to go that route it requires a written offer. I haven't checked but would be surprised if they had that.

Re: Android now forces apps to include proprietary code for push notifications

#75
post #26

> Problem: The Firebase Android client library is proprietary, meaning FOSS apps can not use it. Apps that do not comply are reported to the user as "using too much battery". This is a standard on the industry. From 1999: https://www.theregister.co.uk/1999/11/05/how_ms_played_the_i... It doesn't matter how much money Google is going to have to pay in the future as a fine for this practice. The amount of money that th…

So, if I understand correctly, the GPL prevents you from using a non-free library in your code? (Asking honestly: I have tried to find this elsewhere but the FSF page on the GPL is rather ... convoluted). If that is so, then this is obviously a killer and quite seemingly arbitrary requirement. Your MS example is quite good.

The GPL requires that all code with the software under the license to also comply with the GPL, which includes libraries. Therefore, it's simply not possible (legally) to use non-GPL compatible libraries with GPL software. A lot of open-source licenses are compatible, such as the MIT or BSD license, but proprietary licenses are not obviously.

Re: Android now forces apps to include proprietary code for push notifications

#76

Earlier quoted context omitted.

I mean, I could, but I think it's fair for me to assume that the GitHub repository that the official website links to as the source code for their client is where they’d publish up-to-date code.

They might well publish it right there if you ask. Just saying they haven't violated the license as long as they have a written offer to provide you with the source code somehow if you ask. (That's what GPLv2 seems to require.)

They provide no alternative "written offer". On the website, they directly point to GitHub for the source code offer: https://telegram.org/apps#source-code

Re: Android now forces apps to include proprietary code for push notifications

#77
post #67

Earlier quoted context omitted.

I was using clean LineageOS for over 2 years, recently switching to LineageOS+microG. I'm using APKPure and F-Droid for apps, Chrome for browsing (as in Firefox, last time I checked, one tap separates you from losing all open tabs). Some apps refuse to work or break (e.g. Bitwarden does not sync), some have degraded functionality (e.g. WhatsApp sometimes does not ring when someone is calling you), many are just spamm…

microG still sends data to Google though, I believe, even though the local code is open. Without Google involved at all, Android is barely usable as a daily driver. I tried for a while.

It keeps connection to Google, but at least does not send your location and does not help Google with personalizing ads. I'm also not logged into Google account.

When all I needed of my phone was web browser + YouTube playlists + FB Messenger, lack of Play Services did not seem to be big deal.

Re: Android now forces apps to include proprietary code for push notifications

#78
post #56
post #51

So to summarize, to save battery all notifications on Android (since two versions ago) have to go through a single notification service (rather than each app having the option of continuously running in the background and maintaining a connection with its own notification service). Recently Google killed their GCM notifications service in favor of Firebase Cloud Messaging, which (unlike GCM) unfortunately doesn't hav…

> So to summarize, to save battery all notifications on Android (since two versions ago) have to go through a single notification service And presumably the user has no way to install alternate notification services?

I don't think so. A "notification service" isn't something that exists solely on the user's device; there's also a server-side component that each remote service that wants to send a push notification has to interact with.

So for Android to support alternate notification services, every app/service that wants to send push notifications would _also_ have to support those alternate services on their backends.

Re: Android now forces apps to include proprietary code for push notifications

#79
post #39

This has been coming for a while. We attempted to create a push-based notification system based on MQTT. It worked well, then the notifications started getting lost. Turns out, the receiver service was getting killed in the background. We found out the best way to get reliable notification was through Google's own GCM (which has now moved to Firebase Cloud Messaging. We learned its incredibly difficult, if not imposs…

This has been true for awhile once they forced apps to use API26 or higher (if you want to be listed in the Play store, and really, there is no other place if you want decent exposure.)

I had a similar experience switching from "real background" to using FCM. I understand the battery saving motivation, but the problem is that the performance of the google service is terrible. The response time of my simple notification system was nearly instantaneous, but OK google, I'll play your game. I put together something that used FCM and it can take 15 or 20 MINUTES to get even a "high priority" message from FCM.

Reading the google docs, apparently google will deprioritize notifications that are shown but "not intereacted with" in a timely manner, so that is another source of delay.

I think the crux of the matter is that notifications have multiple purposes: signaling, and advertising, etc. Google hasn't provided a way for an app to declare its use case. So, you get policies to prevent notification spam creeping in and messing with basic app signaling functionality.

In the end, I kept both my "in-house" notifications for use by older Androids, and a kluge that uses FCM in addition, with some hacks to get somewhat better FCM performance. I live with the notification in Oreo+ and just tell users to ignore it (but honestly, I don't think users care that much.)

Re: Android now forces apps to include proprietary code for push notifications

#80
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.

Post reply on HN