5
rsrj
7y

There must be a simple, reliable, compatible, battery efficient way to poll an api every ten minutes and send user a notification, right?

AlarmManager : Ok. But who cares about battery anyways?

Google cloud messaging : Ok, you can have battery efficiency. But who lives without Google anyways?

JobScheduler : Ok, but you need Lollipop. Which Android phone doesn't get updates? Oh wait, shit.

Comments
  • 2
    I live nearly entirely without google!
  • 0
    @linuxxx That's what I meant.
  • 0
    @rsrj Ohh then I understood it wrong!
  • 0
    Just use a websocket and push your message whenever needed. Polling the API is like writing a DDoS attack against yourself
  • 0
    @Froot OK, so I put it in a wrong way. It was just a hobby project, I am not a developer of the forum. I wanted to check new comments on the forum so I used their API to make an app for my phone. And, I don't think polling every 10 **minutes** will lead to a DDOS.
  • 0
    @rsrj Ah yea, 10 mom is fine I guess. I was just making a general statement 😄
Add Comment