How to Get the Latitude

public double getLatitude () was added in API level 1
Get the latitude, in degrees.
All locations generated by the LocationManager will have a valid latitude.

1. In the file, Get the Last Known Location

2. Declare a Double variable named dblLatitude

3. In the onCreate method, add the below line. This test and make sure the myLocation object is not null, and if not null, will get the latitude, in degrees and save it to a double variable named dblLatitude. Note: This will be the Last Known Latitude. It may not be the current latitude.

if (myLocation !=null) {
    dblLatitude = myLocation.getLatitude();