Skip to main content

Posts

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
Recent posts

Display Route in Google Maps API v2 on Android

I was looking for a way to get the route between 2 points and displayed in the Google Map using Google Maps API v2. After around many sites to get an actual idea of how to implement the Map Route in Android using Google Map API v2. First I will give you a small & simple description of the Map and Route. -    Route is just Poly-lines which is connected with each other. -    Google API gives routes between two locations. -    Also give Distance, Total Duration, etc. -    Just we want to give two coordinates between two locations (cities, states, etc.) Here I would like to share Google Map API v2 which displays Route between two locations. Please look below the Route between the two location images You can download full source code from here. AndroidMapV2Route Example AndroidMapV2Route.apk If you are satisfied with this post then please give your comments. Thanks for your interest!!!

Interesting Android Story

As far as time passes most of people looking for buy new Smart Phones and if I say current trends then I must have to say that more than 90% person having Android Device as Smart Phone. Because of its easy to operate and understand the new functionality. In Market there are lots of Smart Phone available and most of them having Android OS. So let we see what is android history till now from Older version to Current Version (Kitkat). Do you how Google choose Android Codename? I notice this so I would like to share my thoughts with you guys, Its simple answer here. They go through alphabetical order. You can see its version name. Its start from C, D, E to K...  Now next name must be start with "L" CupCake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich, Jelly Bean, Kitkat, 

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.

Display Toast in different style : Crouton

I know most of people uses Toast when displaying message i.e. Warning, Error, Confirmation, and so on. But today we show the toast in different way. And this toast already have been seen by you in Facebook Android application. Its display when network is not reachable. So now we move to our main point. How to generate that kind of toast with custom style. Here I attached screen shots so you can check it and help from it. [Crouton - Alert Message] [Crouton - Confirm Message] [Crouton - Custom View Message] [Crouton - Custom View Message at specific place] You can download full source code from here. CroutonAndroidApplication If you are satisfied then please give your comments. Thanks for your Interest!!!

Google Maps API v2 using Android

We know how to add Maps in Android Project. But here I would like to share Map Integration (Google Map API V2). Google has deprecated the Google Map API v1. From now we use Map API v2. For more details you can check developers document. https://developers.google.com/maps/documentation/android/ Why Google Map API v2? The new Google Maps Android API v2 allows you to offer interactive, feature-rich maps to users of your Android application. Some features are: * Caching part is improved * Maps are now turn into 3D * Faster, smoother and use less bandwidth Google Play Service : Library As per new Google Map API v2 we need to add google_play_service_lib for reference to our project. You can found that library from this location. android-sdk\extras\google\google_play_services\libproject\google-play-services_lib Here I display screen shots in step by step to how to follow it. [Configure Android Key for Google Map v2] [Android API Key for Google Map v2]