I am trying to get latitude and longitude using GPSTracker
class, it always returns 0.
I traced the code, it took me to the LocationManager
java file, it shows three imports with Cannot resolve symbol
errors. Please see the picture below.
By the way, in the GPSTracker
class, this line:
location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
returns null
, that's way I get 0 for latitude and longitude.
I can compile the code without any error.
much appreciated if someone could help.