start GPS Tracking - Android Phone

Android examples for Phone:GPS

Description

start GPS Tracking

Demo Code


//package com.java2s;

import android.location.LocationListener;
import android.location.LocationManager;

public class Main {
    private static LocationManager locationManager;
    private static LocationListener locationListener;

    public static void startGPSTracking() {
        locationManager.requestLocationUpdates(
                LocationManager.GPS_PROVIDER, 0, 0, locationListener);
    }//from  w w  w. j a  v a2 s  . co m
}

Related Tutorials