Skip to main content

Posts

Showing posts from December, 2013

Introduction and Example of Eventbus in Android.

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

RoboGuice Example in Android

This library having good implementation for Android developer who don't won't spoil time written for initialize the Components, Resources, and so on. As I know those who want only like to written minimum code and output will be more. So use this library. Guide means make development and debugging the code very easy and faster. With the help of RoboGuice library you should be able to understand your code very speedily with minimum time. What is RoboGuice? RoboGuice is a dependency injection framework for Android applications. RoboGuice is a framework that brings the simplicity and ease of Dependency Injection to Android. RoboGuice 2 takes the guesswork out of development.Using RoboGuice, you can inject your View, Resource, System Service, or any other object.To express a dependency, you use annotations like Inject. Usage of RoboGuice library: Views Injection: To initialize views - use @InjectViews, for example: @InjectView(R.id.txtName) TextView txtName; Resou

Android Volley Network Library

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.