EventBus is a library of Greenbot . This is very simple for all users how to implement and its basic use. Here I will also share examples for better understanding. What is EventBus? EventBus is subscribed/publish event bus to communication between components with limited lines of code, in short, its bus for events transfers the data between one activity(class) to another to reflect the changes based on our needs. That makes the data exchange between components like Activity, Fragment, Services, and any kind of backgrounds threads pretty easy. EventBus can handle the threading for us: events can be posted in threads different from the posting thread. Common use can be dealing with UI changes. In Android, UI changes must be done in the Main(UI) thread. In other words, networking or more time-consuming task cannot be handled in the Main thread, for that we must use AsyncTask or Handler to make it more smooth. Now we have one more options use EventBus to change the UI po...
Volley - HTTP Library for Android
In every project we most of use Network related task and pull JSON data or sent JSON data to the server. Same way we fetch images or thumbnails over the HTTP protocol API. So here, same thing happen with Volley Library. So let's see what is volley library and what's advantages to use in our project.What is Volley Library?
Volley is a library that makes networking for Android application easier and most importantly, very faster and work smoothly. It can manage the processing and caching of network requests and it saves our valuable time compare to other network library that included in by default. But using this library you can achieve fast and rapid application development when you want to use network related task.Features:
- Volley automatically schedule all network requests. It means that Volley will be taking care of all the network requests your app executes for fetching response or image from web.
- It provides memory caching.
- It provides powerful customization abilities.
- It provides powerful cancellation request API.
[Volley Main Activity] |
[Image Loading Screen] |
[JSON Request Screen - Lazy Loading Images] |
You can download full source code from here.
VolleyDemo
If you are satisfied with this post then please give your comments.
Thanks for your Interest!!!
Comments
Post a Comment