Is It Possible To Programmatically Access The Google Maps' Navigation History?
I wonder if it possible to retrieve the Google Maps navigation history. In other words, is there a way of retrieving the recent routes taken/searched by the user of the Google Maps
Solution 1:
You can not finish Google Navigation App.
There is only one work around which I found, Re-start the navigation with the current location, hence the navigation will automatically be finished.
publicstaticvoidstartNavigationIntent(Context activity, String destination)
{
Intent intent = newIntent(android.content.Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + destination));
activity.startActivity(intent);
}
And then bring your app to the foreground.
Intent bringToForegroundIntent = newIntent(BackgroundLocationService.this, DashboardActivity.class);
bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(bringToForegroundIntent);
Solution 2:
There is no API available to get information out of the Navigation App. But you can feed some data to Maps to request a route through an Intent / URI.
But I don't think that the Maps app will save the whole route anyway, only the destination. The user selects any saved destination and you can get there from any source.
Post a Comment for "Is It Possible To Programmatically Access The Google Maps' Navigation History?"