Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
This question is actually not about the coding, so I don't put any codes here.
While looking into the Volley library, I found out that some part of the APIs contain classes (e.g. classes of the org.apache.http packages) that are now deprecated in Android API level 22.
As I'm concerned about getting adjusted to the newest API environment, do you think it is still worth using Volley or would you recommend using other libraries such as OkHttp or Retrofit?
Check out the detailed response:
Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley
Personally, I went native to keep things simple and robust. Using it for JSON responses and occasional images with no problem and I don't think they will deprecate HttpURLConnection anytime soon.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I have been using Firebase for 'Android' for very long time without realizing that it has REST service that I can use with the help of any backend library such as the SDK-HTTPUrlConnection or any other third party library such as Retrofit or Volley. I tried using that to see why is it different? Why would I stop using the easy things Google gives to us in the Firebase to use the REST API, I actually could not answer that question, please any know why does it exist, is it not made for Android (although it works cuz it is just a normal REST)? or Why do u think?
The REST API is for development environments that don't have a provided client library. Client libraries are only provided for Android, iOS, and web. Server libraries are only provided for Node.js, Java, Python, and Go. What if you need to access Realtime Database from C++? Or Perl? Use the REST API - it's pretty much universally available.
If the Android library is working for you, then keep using it. No need to worry about the REST API.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am having a hard time in understanding the Retrofit for my App. I want to use retrofit in it but I am not understanding about it much.
Everthing is very confusing in it. Can any one help me to learn it completely
I dont know how to start and from where to start
The links I have gone through while trying to learn are as follows :
Using Retrofit 2.0 in Android
http://www.vogella.com/tutorials/Retrofit/article.html
http://mobilesiri.com/retrofit-tutorial-android-studio/
http://www.androidhive.info/2016/05/android-working-with-retrofit-http-library/
https://futurestud.io/blog/retrofit-getting-started-and-android-client
First you have many different library you can use instead of Retrofit , the basic one and i think the simplest is Okhttp but you have to understand that Okhttp is no more supported but still work when you downgrade your SDKVersion , and you can use Volley to perform the same service as Retrofit
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I did some research on Google Volley and found that it is somewhat easy and clean to use.
But I am still not sure as to what the advantages of using it are and whether I should still use the AsyncTask.
I know AsyncTask works as a background task and that it is separate but what about Volley?
Which one should I opt for?
This is mainly an opinion based question that is largely dependent on the needs of your particular application. Volley provides a lot of things for you out of the box, like network caching (assuming you're given correct cache headers from your server), and an easy to use API with all of your callbacks and different threading layers handled for you. So, it really depends on what you're looking. Personally, I think any production worthy application should use some sort of networking library that a team has spent plenty of time patching and prepping for you (rather than trying to reinvent the wheel), and since a Google team has gone through the trouble for doing this for you...why not?
One cannot compare Volley with an AsyncTask.
So your question makes no sense.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am still discovering funcionalities of both, but I have one question on my mind.
Why to use Picasso over OkHttp?
OkHttp supports pretty much the same thing as picasso, is just that picasso is simpler to use for loading and caching images....
Is there some other important thing that I miss, and that is not included in OkHttp?
And if I use Picasso, do I still need to import OkHttp or it is already included in picasso?
Picasso is an image downloading and caching library for Android.
OkHttp is HTTP & HTTP/2 client for Android and Java applications.
So, the libraries have completely different purposes. Picasso is completely focused on the image handling. For instance, you cannot use OkHttp to resize an image...to define the crop model to apply...etc
You can use Picasso with OkHttp if you want.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
There are many frameworks to make http requests in Android, like Retrofit and Volley. But also, Android has its own classes to make this type of request, like HttpURLConnection and HttpClient
So what is the advantage of using some framework like these mentioned?
My doubt is if there is some big advantage in make requests using some framework, instead of using Android native classes.
The advantage is things like retries, restarts, threading & synchronization, and state management will be handled for you. This comes at the expense of configurability, but it's not a huge expense.