Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: start navigation in walking mode

I'm trying to start an Intent for a navigation:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + item.getPoint().getLatitudeE6()/1E6 + ","+item.getPoint().getLongitudeE6()/1E6)));

This works fine, but the navigation starts in driving mode. How do I start the navigation in walking mode?

like image 979
Paul Spiesberger Avatar asked May 24 '12 17:05

Paul Spiesberger


People also ask

How do I change Google Maps to walking on Android?

1. In the Google Maps app, enter your destination and tap Directions. 2. Select the Walking icon at the top of the map screen.


1 Answers

This should work fine:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("google.navigation:q=your+address&mode=w"));
       startActivity(intent);

Regards.

like image 63
user1421701 Avatar answered Oct 16 '22 08:10

user1421701