Android location api

 

The following assumes that you have already basic knowledge in Android development. Please check the Android development tutorial for the basics.

Google provides via Google play a library for using Google Maps in your application. The following description is based on the Google Maps Android API v2 which provides significant improvements to the older API version.

The library provides the com.google.android.gms.maps.MapFragment class and the MapView class for displaying the map component.

Android location api

In this article, we will develop an Android application which facilitates users to tap two locations in the Google Map. On taping the second point, a driving route will be drawn in the Google Map Android API V2 using Google Directions API .

This application is developed in Eclipse (4.2.1) with ADT plugin (21.1.0) and Android SDK (21.1.0) and tested in a real device (Android 2.3.6  -  GingerBread ).

Google Map for Android is now integrated with Google Play Services. So we need to set up Google Play Service Library for developing Google Map application in Android.

The following assumes that you have already basic knowledge in Android development. Please check the Android development tutorial for the basics.

Google provides via Google play a library for using Google Maps in your application. The following description is based on the Google Maps Android API v2 which provides significant improvements to the older API version.

The library provides the com.google.android.gms.maps.MapFragment class and the MapView class for displaying the map component.

Most Android devices allow to determine the current geo location. This can be done via a GPS (Global Positioning System) module, via cell tower triangulation and via wifi networks.

Now you can access the last known location. The fuse location provider provides a new simple API. The following is an example activity which uses it.

The Geocoder class allows to determine the geo-coordinates (longitude, laditude) for a given address and possible addresses for given geo-coordinates.


There are many times when your Android app will need to fetch data from the internet, to provide users with fresh information and/or data. There are different ways your app could achieve this. You could set up your own web service/API, or you could be fetching from an already existing service/API. In this article, we discuss how to use a web API from within your Android app, to fetch data for your users.

There are two major methods for retrieving data from most web services, XML or JSON . XML stand for eXtensible Markup Language, and its syntax somewhat resembles HTML (Hyper Text Markup Language), in that they are both markup languages. Sample XML representation of a human can be

JSON stands for JavaScript Object Notation, which is a nod to the fact that it is a syntax that was developed for the Javascript language, as a means of parsing Objects between programs. JSON has a comparatively standardized syntax, compared to XML, and the above XML human can be represented in JSON as