Live data from Hacker News

Android now forces apps to include proprietary code for push notifications

reddit.com

211–220 of 284 posts

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

#211
This is pretty darned incorrect on a number of fronts. Skipping for the moment that a random histronic Reddit post is being considered "news"...

> "Google started leveraging its de-facto monopoly on Android distributions by forcing all apps to use its proprietary service Firebase for push notifications."

A number of logical leaps of faith need to be made before the word "force" carries any truth, but no one's "forcing" anyone to do anything. A developer can still use the FCM or not, it's up to them. If a developer simply refuses to interface with any sort of proprietary code then it's a wonder they'll touch any commercial product at all (iOS included).

..and since Telegram-FOSS were cited as a source for this mess, here's the very first part of [i]their[/i] statement, which is also not true:

> Since Android 8.0 Oreo, Google doesn't allow apps to run in the background anymore, requiring all apps which were previously keeping background connection to exclusively use its Firebase push messaging service.

Sooo very not true. Android [i]does[/i] still allow apps to run in the background. The developer docs caution against doing so without good reason because so many developers try very hard to ignore the lifecycle methods, resulting in many wasted clockcycles and reduced battery life.

But the Telegram team didn't stop there, so let's unpack the rest:

> Sadly, if the app would set the notification to lower priority (to hide it a bit in the lower part of the notification screen), you would immediately get a system notification about Telegram "using battery", which is confusing and is the reason for this not being the default. Despite Google's misleading warnings, there is no difference in battery usage between v4.6 in "true background" and v4.9+ with notification.

First, it's not a "warning". It's simply a statement. ...and yes, if you're going to maintain a separate push notification service of your own (I'm looking at [i]you[/i], Facebook.) you [i]are[/i] going to be using at least a few clockcycles. There's no way around this.

The backgrounded apps notification is also as "judgement free" as any notification can possibly get. On my phone right now, running Android 8.0... "3 apps are using battery". One of these is my own app (which happens to be a homescreen widget), another is Life360, and another is GSam Battery Monitor. Tap that notification and a list appears, headed up with "Apps running in background" with "Tap for details on battery and data usage" and lists the apps with their icons. Tap one and it shows what resources the app [i]is[/i] actually using. GSAM... 52Mb of RAM, and ~55kB of data in the last month. 0% battery used since last full charge. My app, 0% battery (probably not enough to count as a whole percent) use since last full charge, 5.84MB of internal memory, no data usage. I don't know how other people might view them, but to me these seem like vindications. None of that information is being presented in any way that that should be construed as condemning or accusatory, let alone "misleading".

If Telegram-FOSS doesn't want users throwing a fit about their resource usage, perhaps they should spend a little time grooming user expectations to be more reasonable.

The reddit user who posted this mess, on the other hand... A five-year old account that only occasionally posts anything that doesn't smell of astroturf, and this one post is nearly 80% of their karma. Seems like they've decided to make a foray into outrage-farming.

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

#212
post #155

Earlier quoted context omitted.

It's what I've heard rehashed around HN, but afaik the actual policy is more or less as described here: https://forums.developer.apple.com/thread/18922 Essentially it works like it should anywhere else: If you don't publish source code and someone complains, you're out. In an ideal world Google Play would hold itself to the same standards. However, the App Store does impart restrictions which are incompatible with GP…

They haven't been removing GPL code actively, they decided not to take the risk of using GPL version 3 software, so they've let the respective versions of bash, rsync etc. linger at their last released GPL version 2 releases. E.g. Git is on GPL version 2 still (and probably forever), and Apple continues to update that in a relatively timely fashion.

[deleted]

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

#213

Earlier quoted context omitted.

Google puts 1 restriction, they are the enemy. Apple has created priopritary connectors, closed off systems, paid barriers to entry, and banning apps from their store. Where is Apple and Microsoft on the scale from Friend to Enemy?

^ this is commonly known as 'whataboutism'.

No I asked a question

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

#214
post #194

Earlier quoted context omitted.

Defending users by actively lying about battery usage is not acceptable. Battery meter in 8 was accurate and flagged battery eating apps accordingly. This new thing is actively lying when you don't use Firebase, as if nobody can ever correctly implement push notifications.

I'm not sure what you're talking about exactly? What's the "new thing" in your post? (Btw, the on-device battery meter is horribly inaccurate and always has been. Multiple values, like screen power use, are hardcoded by OEM and tracking app power use is not reliable in any case because those graphs are incapable of measuring cascading power efficienty effects coming from using the radio or Play Services. Use Battery…

It's really really really hard to attribute battery usage correctly when it comes to push notifications.

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

#215

Earlier quoted context omitted.

Dependencies are different than source code. You can write FOSS that runs on Windows, which is a dependency and not FOSS.

As long as it doesn't require linking to a proprietary Windows library to interface with the NT api. That would violate at least the GPL 2. Though you could do it yourself, and release your own code as GPL (and the combined work as proprietary), no one else could distribute the full work under the GPL because of the incompatibility.

You can ship so long as it's not statically linked.

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

#216

Google probably wants one stream of data coming in that they have complete access to. Also probably make it more convenient to tap for the NSA

This was my first thought as well. If you can't get encrypted messaging apps to use the SMS service siphon you can at least snag notification text - and most people allow the message to be in the notification.

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

#217
post #172

Earlier quoted context omitted.

GCM/FCM will delay low priority notifications, in order to batch as many together as possible. On top of that, the cell networks don't allow keeping a socket open for more than a few minutes without sending keepalive packets. Unlike on desktop, keeping a socket open isn't "free" on mobile. Waking up the cell radio has a significant penalty on battery life. (And yes, Android batches up process wakeups as well. See the…

> On top of that, the cell networks don't allow keeping a socket open for more than a few minutes without sending keepalive packets. Unlike on desktop, keeping a socket open isn't "free" on mobile. You are wrong. Cell networks don't prevent you from keeping a socket open for however long you want. For how to keep your sockets alive, see https://developer.android.com/reference/android/net/SocketKe...

Keepalive across cells are not universally available. Most mobile networks renew your IP at each handover.

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

#218
post #185

Earlier quoted context omitted.

> What exactly do you expect Google to do here? Let app developers and users have a choice.

That was exactly the state of the Android until 6.x or so and I've had multiple frustrating hours of mentoring Android developers on how to do notifications respectfully just to be ignored with "eh, I'll poll every 10 minutes, it's easy and it works!". And this has been my experience constantly: - "Eh, I'll just demand full storage access for my game, it's easier to unpack files in root of sd card" - "Eh, I'll just c…

I do believe you when you say a lot of devs are taking the easy way out and wasting device resources. But some devs do things right. And those devs are the ones being penalized. Perhaps worse, the user's choice of apps has been constrained.

It would have been so much better if the Play Store and SDK and Android platform could have features that clearly highlight these resource-hogging apps as bad actors. That's the kind of killer feature I expect from Google. I don't feel like they're living up to their reputation for hiring brilliant programmers. Instead they're taking out a really large hammer and hitting everyone with it.

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

#219
post #172

Earlier quoted context omitted.

GCM/FCM will delay low priority notifications, in order to batch as many together as possible. On top of that, the cell networks don't allow keeping a socket open for more than a few minutes without sending keepalive packets. Unlike on desktop, keeping a socket open isn't "free" on mobile. Waking up the cell radio has a significant penalty on battery life. (And yes, Android batches up process wakeups as well. See the…

> On top of that, the cell networks don't allow keeping a socket open for more than a few minutes without sending keepalive packets. Unlike on desktop, keeping a socket open isn't "free" on mobile. You are wrong. Cell networks don't prevent you from keeping a socket open for however long you want. For how to keep your sockets alive, see https://developer.android.com/reference/android/net/SocketKe...

That method just instructs the OS to send keepalive packets on a system thread.

It saves some CPU power by letting your process sleep, but still requires waking the cell radio up periodically.

The implementation can be found here: https://github.com/aosp-mirror/platform_frameworks_base/blob...

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

#220

Earlier quoted context omitted.

I don't think you're focusing on the entire picture. Some people here like iOS for the reasons you described. However I'm willing to bet, unless you can show me otherwise, that it's a vocal minority. I don't know of anyone personally who is happy that Apple disallows GPL code. Comparing Apple's digital Fort Knox with Google's unsupervised free-for-all is a false dichotomy. There exists a happy medium, where power use…

> There exists a happy medium, where power users get all the freedom they want but apps are still by default beholden to certain restrictions. And this is orthogonal to a proprietary API. Is this not the happy medium Google is trying to hit? Power users can unlock their bootloader and do whatever they want. This is still officially supported, with vendor blobs officially provided. By default things are restricted to…

That's what I thought when I bought my Sony phone. Except when you unlock it you run a crippled version of the phone.

Huawei recently stopped allowing bootloader unlocks.

Unlocking the bootloader is becoming increasingly rare.

To be honest, ignoring the back and forth between the discussions here, am the only one that doesn't get WHY the firebase library isn't open source? It could just be GPL right? Most of the interesting stuff happens in the backend anyway, so what's the issue.

Am I also the only one that thinks this gives google the chance to lock out/cripple third parties like huawei or other non certified android vendors from distributing Android apps that were built for the play store.

Post reply on HN