Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
If not with an asynctask (lets assume okhttp is an asynctask), how else would you post data on a server
-
@BindView okhttp is one level of abstraction below what you'd want to use.
Something like Retrofit is what you'd use, backed by a JobScheduler job written to retry with a backoff if it fails to actually initiate this (also only trying when the right kind of network i.e mobile data or wifi depending on task, is available).
So your task is persistent through reboots, retries automatically and appropriately, and happens in the background in safe way. -
Haha thanks, people always tag me as blindview tho.
Yeeeah i dont like retro, id rather use volley but thats just my quirk. Whats your opinion on using rxandroid for api calls? I found it really responsive. -
@BindView I'd only used volley once a long ago for image loading. Retrofit has since surfaced as a more modern library for network calls.
I haven't really used Volley enough to comment on how it is as a library, though it is deprecated now so meh.
Oh, I didn't know there was a way to do it directly with rxandroid, thanks for the tip!
Related Rants
I'm trying to explain to this dumb mf-er why we can't use send data simply.
It's a mobile platform I said, you can't rely on having network I said, the dumbass users might try it on 2% battery I said.
DO'H BUT MY INTERZ CAN DO IT IN 5 MINUTES.
Yeah, enjoy crashing the app with asynctask like a stupid bitch. When it fails under nearly every possible condition that deviates from the ideal, you can go write down how great your interns are, eat it up, shit it out and when you grow a flower from that, then I might help you again.
Retard server people.
undefined
server
android