I am creating an app where I need to start the navigation app and then use the result (most importantly the driven distance). I am starting the navigation activity with startActivityForResult and using the scheme "google.navigation". Like this:
Intent i = new Intent(
Intent.ACTION_VIEW,
Uri.parse("google.navigation:q=Somewhere"));
startActivityForResult(i,1);
This works great, I get a callback when the activity is done, but the data portion of the activity is empty.
Is there a way to do this?
Is there a navigation history where I can browse the latest trip for data?
Best Regards Jakob Simon-Gaarde
Is there a way to do this?
No, there is no way for you to force an activity to give you a result. The determination of whether an activity supports a result lies in the authors of the activity, not the caller of the activity.
Is there a navigation history where I can browse the latest trip for data?
There is no documented and supported API for the Google Navigation Android app (which includes the google.navigation scheme).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With