In my Android App, I am able to launch the Google Maps Navigation to initiate driving directions. However, I'd like to be able to get feedback into my app (the app that launched the navigation), with information such as time of arrival, and miles. Is this possible? Would I need to use onActivityResult ()?
Asked
Active
Viewed 750 times
2 Answers
1
To achieve this functionality you will need to use the Google Maps Directions API (see the documentation).
Also, you will need to take into account its usage limits.

antonio
- 18,044
- 4
- 45
- 61
-
Thank you. Question: for example, if the Google Navigation app is providing directions in real-time on the Freeway (30 mins left, 10 miles to go...), is it possible that the Google Navigation app provide this information in real time to my own app? – code Nov 18 '15 at 07:55
-
@android-user If with "Google Navigation app" you mean Maps (https://play.google.com/store/apps/details?id=com.google.android.apps.maps) then it's not possible. You can ask Maps for navigation but it won't give you any feedback – antonio Nov 18 '15 at 07:58
-
Got it thanks. I guess in my App (the one out of focus), I could intermittently calculate the Time Left and Miles Left from destination. – code Nov 18 '15 at 08:05
-
I'll use this Google Maps Directions API to calculate estimated time and miles away. – code Nov 18 '15 at 08:05
0
I think the communication between your app and Google Maps can go only one way. Google Maps won't return anything to you.

k3v1n4ud3
- 2,904
- 1
- 15
- 19