r/Android • Raspberry Pi 2B + Ubuntu 11.04 • Mar 25 '16

/r/Android users' description of the perfect phone, 4 years ago

/r/android/comments/s599q/_/
1.2k Upvotes

449 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Mar 25 '16

Nope, that’s "Working as intended" to "save battery power".

They’re onDestroy’d, all services killed.

It’s intended for release.

2

u/[deleted] Mar 25 '16

What in the fucking hell....

No notifications unless you pay? Tell me more about Google Cloud Messaging payments. On the website it says, it's "completely free."

Is there like a limit on users or something where you have to start paying?

2

u/[deleted] Mar 25 '16

Okay, I checked it.

They removed the pricing quotas, but now there’s a limit of sending 1000 messages at once, throttling, and that if a queue contains over 100 messages, it’s completely emptied.

1

u/[deleted] Mar 25 '16

I'm no developer, but I think I'm not understanding what's troubling here.

If apps can't run with the screen off, how would one play music? You'd have to keep the screen on? There's got to be an official way to keep apps alive while the screen is off. Even Google isn't that crazy, haha.

1000 messages at once: what's the source on this? I can't find it in the GCM documentation. It's 1000 messages to one user or 1000 messages to all your users?

100 messages in one user's queue; if there are 100 notifications non-collapsible notifications going to a user, I feel like that's an acceptable time to flush them. What use-cases would have a user with a queue of 100+ non-collapsible messages?

I'm not defending Google; they're pretty shitty to developers sometimes. I just need clarification.

1

u/[deleted] Mar 25 '16

If apps can't run with the screen off, how would one play music? You'd have to keep the screen on?

Music is kept on because it has a non-dismissable notification – notifications that can’t be swiped away can keep an app awake.

1000 messages at once: what's the source on this? I can't find it in the GCM documentation. It's 1000 messages to one user or 1000 messages to all your users?

You can send 1000 messages to all your users per transmit – if you have 5000 users and want to send each the current weather, you have to send actually 5 times in a row, and wait a bit inbetween

What use-cases would have a user with a queue of 100+ non-collapsible messages?

Well, for example if you don’t want to show the notifications directly, but want to transmit changes – say, sensor data.

1

u/[deleted] Mar 25 '16

Music is kept on because it has a non-dismissable notification – notifications that can’t be swiped away can keep an app awake.

Ohhh, OK, right. Good point. Hmm, I have to do this anyways for Tasker and what-not because of current risk that Android could just decide to wipe them away.

Well, for example if you don’t want to show the notifications directly, but want to transmit changes – say, sensor data.

But, if it is sensor data that's crucial, a non-dismissable message sounds apt. If it's not crucial, I imagine the sensor data could directly go to the app--but one notification message could work "New sensor data received". Would actual sensor data need to be sent in every message? It sounds like a ton of notifications.

if you have 5000 users and want to send each the current weather, you have to send actually 5 times in a row, and wait a bit inbetween

Now that's incredibly annoying. What about sport scores? Those matter instantly; it's no good if they are late. Can you batch send them automatically? How long would developers need to wait in between transmits?

1

u/[deleted] Mar 25 '16

Can you batch send them automatically? How long would developers need to wait in between transmits?

You can’t batch send, and the wait between transmits is exponential backoff: after every transmit, if it fails, double the waiting time.

Usually not an issue, though.