Android google map turn by turn navigation

Viewed 987

I am developing turn by turn navigation from current location to destination. I done this by using below code

Uri gmmIntentUri = Uri.parse("google.navigation:q="+address);
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);

The problem is that if click back in screen 1 it takes to screen 2. Then if i click back in screen 2 it takes to screen 3, then screen 4, then finally my activity.

What i want is if click back in screen 1, how can i take to my activity? how can i finish screen2, screen3, screen4 by clicking on back in screen1?

screen 1:

enter image description here

screen 2:

enter image description here

screen 3:

enter image description here

screen 4:

enter image description here

3 Answers
Related