I am trying to make an android application, with a button I call google navigation and it works correctly, and my question is: somehow I can close the navigation of google once finished and return to my application?
I do not want to press the back button.
This is the method
Uri gmmIntentUri = Uri.parse("google.navigation:q="+ lat + ","+ lng + ");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK&Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
mapIntent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
startActivity(mapIntent);