Hi guys I wanna launch navigation in a point with google maps with my map but I don't know how to keep my position that is set as "start position". My app have in the main activity the map, and in another activity the button that launch navigation but as I've said, I can't keep "my position". How can I do? Below my call to google maps from the activity without the maps.
directionButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Marker marker = null;
BuildInfoMatrix latlong = new BuildInfoMatrix();
MainActivity main = new MainActivity();
latlong.Fill_Matrix();
// **************************************************
/* Richiamare google maps per la navigazione */
/*********************************************/
String destLat = latlong.getLatitude(nomeditta).replaceAll(",", ".");//ritorna lat.replaceAll(",", ".");
String destLng = latlong.getLongitude(nomeditta).replaceAll(",", ".");
String uri = String.format("geo:%s,%s?q=%s,%s", marker.getPosition().latitude,marker.getPosition().longitude,destLat,destLng);
Intent prova = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(prova);
/*********************************************/
}
});