Google provides a service to integrate Map to Android App. Google Maps Android API, can be used to add maps to your application. The API provides functions to handle the access to Google Maps servers, data downloading, map display, and response to map gestures.
The latest release of the API “Google Maps Android API v2″, allows you to add maps into an activity as a fragment with a simple XML snippet.
Running 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.
Google Maps v2 Android API, can be embedded into an activity as a fragment with a simple XML snippet in the layout file. Running Google Maps v2 on older version of Android “below API 11″ needs some support classes from the support library. Here we will see how to setup Google Maps v2 on Android 2.3.3.
To develop an app using the Google Play services APIs, you must add Google Play services Library to your app. Google Play services can be downloaded from the SDK Manager. Once it is downloaded we will import it to our App.
We need to get Google Maps API Key from Google API Console to access the Google Maps server. We need to provide application signing certificate “SHA1 fingerprint” and its package name in order to get the Key. Once we have the key, we will add it to application AbdroidManifest.xml file
Android 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.
You 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.
HTTP POST allows you to send data to the server in different formats such as XML, JSON or binary. Of course, the server should be ready to handle data in the selected format. This article shows how to send JSON data from Android app to a server that can handle it.
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.
Most 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.