Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
what changed value method gettime() in LocationListener when change time mobile?

public Location getLocation() {

    LocationManager locationManager = (LocationManager) mContext
                .getSystemService(Context.LOCATION_SERVICE);

        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
       String provider = locationManager.getBestProvider(criteria, false);

                    locationManager.requestLocationUpdates(
                            provider,
                            0,
                            0, this);

                        Location  location = locationManager
                                .getLastKnownLocation(provider);

       return location;

}
Posted
Updated 23-Aug-14 19:31pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900