Reputation: 3
I'm a beginner for android. Your helps are really appreciated.
Description on code below: Once user click on a marker, they will be redirect to google navigation. So, when i am in google navigation page, is there any way to press on back button just once in order to back to my app? As now i need to press back button for a few times
(google navigation->google map-> myapp).
@Override
public boolean onMarkerClick(Marker arg0) {
String url="google.navigation:q="+Latitude+","+Longitude;
Intent intent2 = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(url));
Intent intent3 =Intent.createChooser(intent2, "Testing");
startActivity(intent2);
return false;
}
};
map.setOnMarkerClickListener(markerclick);
Upvotes: 0
Views: 768
Reputation: 5336
Maybe I am wrong, but I don't think you can control that. You are not in your app anymore and you can not know how the other app (in this case, googlemaps, from what I understood) is going to organize its activities and fragments to handle the navigation. :/
Upvotes: 1