Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android google map turn by turn navigation

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

like image 778
selva_pollachi Avatar asked Mar 13 '16 06:03

selva_pollachi


1 Answers

For this May be the Below Solution works i am not sure but let you try with this.

Start the Screen 2,3 with android:noHistory="true" in its manifest entry.

Launch the Screen 4 with the Intent

like image 75
Rajan Bhavsar Avatar answered Nov 13 '22 18:11

Rajan Bhavsar