Recently, I started developing Android as a hobby and was looking for an application that could find and track users' positions using Google Maps.
After the application has a GPS lock, the application can track their movements by plotting a route using an overlay class.
I saw similar apps like Mytracks that are open source, but they are too complicated for me right now.
Ideally, I would like to create an application that looks like

He has my code below without import.
What I'm trying to do is create an array of geotomes. Each time you change the location, new geo-information is created. Then I try to use a for loop to iterate through each geo-information and find the path between them.
public class Tracking extends MapActivity implements LocationListener { LocationManager locman; LocationListener loclis; Location Location; private MapView map; List<GeoPoint> geoPointsArray = new ArrayList<GeoPoint>(); private MapController controller; String provider = LocationManager.GPS_PROVIDER; double lat; double lon; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); initMapView(); initMyLocation(); locman = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
The application works fine without errors, but there is no way, the point of the point simply moves as it moves.
Any help would be greatly appreciated Thank you.
android dictionary gps tracking
David Feb 23 2018-11-23T00: 00Z
source share