Reputation: 5830
This is the call that I make:
I This route, which should have atleast 3 metro's and some buses in between them, should find me results.
This is what I send as the departure_time to get that value:
(System.currentTimeMillis() / 1000
And sometimes it works, sometimes no. I tried using the same + 30 (adding 30 seconds to current time) but, again, sometimes I get results, sometimes just ZERO_RESULTS. Why?
I noticed that if I set the time to 5 minutes in the past, it works. but I need it to start at this moment. This makes no sense, why would the call return me results for the past, but not future, for planning
Upvotes: 0
Views: 606
Reputation: 1094
I am afraid your questions is a bit broad since the understanding of how google works internally is a mistery for most mortals, but there is a few cases where you can have zero_results.
The first one is that you use times that are already in the pasts. so always make sure the epoch time you use has not already passed.
Another could be that in the moment you requested the directions, there are no posible routes for your desire destinations, since google collects data from other sources like Live Traffic(for driving), etc.
What I found is that if this issue persist (that you keep getting zero_results) for a specific directions could be actually a Bug of the API, and you can report it in the issue tracker https://issuetracker.google.com/ since I found reported/accepted Bugs (like https://issuetracker.google.com/issues/63884989) related with your issue.
If I found more info I will update this answer.
Upvotes: 1