I am trying to make an app that tracks user movement. so far i have an app that shows the location and the "speed"
protected void onCreate(Bundle savedInstanceState);
setContentView(R.layout.main);
txt = (TextView)findViewById(R.id.textView);
LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
LocationListener locationListener = new MyLocationListener();
locationListener.requestLocationUpdates(LocationManager.GPS_PROVIDER,5000,10,locationListener);
}
private class MyLocationListener implements LocationListener
{
public void onLocationChanged(Location loc){
String longitude = "Long: "+ loc.getLongitude();
String latitude = "Lat: "+ loc.getLatitude();
txt.setText(longitude + latitude);
}
this is my code. but i want to get my speed, trip distance and max and min altitude. if ANYONE can help, please do, it will be greatly appreciated!