简体   繁体   中英

How can I send an intent to navigation with multiple waypoints?

I have an app, and in my app I need to be able to send an intent to start navigation. In that intent, I need to have the start geopoint (or lat lon), multiple way points (as geopoints or lat lon), and then an end (as geopoints or lat lon). I know how to send the intent to do everything except the waypoints. I really need the format of the string that I would be sending to navigation.

There isn't a standard Intent URI for navigation.  

看到这个SO帖子

If you are in the US, you could use an unofficial way (I don't recommend using it though since it's not official). This will launch Google Maps in navigation mode.

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
    Uri.parse("google.navigation:q=an+address+city");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM