Android: start navigation in walking mode

2019-03-28 06:41发布

问题:

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?

cheers, Paul

回答1:

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.