Configuring Android Emulator to Run Google Map v2

android-map-v2-on-emulatorRunning Android Google Map v2 on emulator is not straight-forward. Google Map v2 is “so far” not running on the default emulator even if you try all the options e.g. changing the target “Android API x” or “Google API”.

The only “relatively easy” solution is to manually install two apk “Google Play services & Google Play store” files on the emulator.

 

 

 

Continue reading

Android | Sending & Receiving Custom Broadcasts

android-broadcastAndroid system initiates many system-wide broadcast announcements such as screen turned off and battery is low broadcasts. Also, apps can initiate custom “defined by developers” broadcast. A broadcast is a way to send a message within an application or another application. A BroadcastReceiver is a component that listens and responds to the initiated broadcasts. In this post, we will see how to send custom broadcast and how to declare a broadcast receiver¬†programmatically and using Manifest file to listen to this broadcast.

 

 

Continue reading

Android | Custom ListView with Titles, Icons & Counter

android-pro-listviewYou can customize the ListView by providing a new layout for the list items “rows”. The new layout can be more than just a single TextView. Here will see how to develop a custom ListView with items having leading icons “ImageView“, trailing counters “TextView” and some text in between.¬† Also, we will see how to add items that will act as a group header “title” for a set of other items.

 

 

Continue reading

Android | Creating Android Fragment

android-fragment-2Android Fragment is a reusable module or a component that can be added to one or more activities. You can think of fragment as a “sub-activity” that needs a host “real activity” to be embedded in. Fragment has its own lifecycle, its own input events & can be added or remove at run-time. Also, Fragment can add its own item menu to the activity action bar.

Continue reading

Android Receiving JSON Data from REST Service

android-http-get-jsonMost Internet services will serve “send” you the data you requested “using HTTP GET/POST request” in JSON format. If your Android app is depending on sending and receiving data over the Internet e.g. interacting with social network API, you will definitely need to deal with JSON formatted data in your apps. This article shows how to send HTTP GET request to a rest service that returns data in JSON format & how to parse received JSON data.

Continue reading