I'm using intents to launch Google Navigation:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + location));
startActivity(i);
location
is a string with GPS coordinates.
Google Navigation pops up nicely and plots the route. Can they return some type of callback when the user has reached their destination? Any way of implementing startActivityForResult()
?
If not, what would be my best bet? I've been considering running a service in the background that keeps tabs on the location and ending Google Navigation and returning to my app when the GPS registers that it's near the destination (because I know the latitude/longitude).
Thanks folks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…