In my application, I am starting the Google Navigation with the help of following set of code.
String uri = "http://maps.google.com/maps?saddr="+ gpsLatitude
+ "," + gpsLongitude
+ "&daddr="
+ updateAcceptedOfferDetailsData.getDestinationLat()+","+updateAcceptedOfferDetailsData.getDestinationLon();
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps",
"com.google.android.maps.MapsActivity");
startActivity(intent);
I am passing the Source Lat/Lng and Destination Lat/Lng of the respective addresses.
Problem:- Here my problem is when the Navigation Screen opens there is no option to "Start" rather there is another option "Preview", This problem do not happens at all the places it works fine for some places but not for all. May I know what the whole mess is??
Thanks
There are various reasons why this happens. It's possible the location accuracy option is disabled, you're using an older version of the app, or you don't have proper access to the internet. The Google Maps app itself may have issues, too. Cache files and other app data can sometimes cause various issues with the app.
This worked for me:
"To anyone who runs across this thread, I discovered the cause and solution to this issue in some cases.
When you search for a location using google.com or the google app, then tap the directions button, the start and end points are passed to the google maps app. When you select the route and only see the preview option, it's because google.com/app passed a starting set of coordinates to the maps app, so your asking google maps to provide directions between two points, not your current location to a point. Thus no turn-by-turn. Simply tap into the start field and select current location, bam."
I had a new (Samsung) phone and the problem was that the Location permission was not enabled yet for Maps.
The fix for this issue is to set the starting location to "My Location" and it will prompt you to grant the Location permission, and the issue will be resolved.
The root cause of the problem is that turn-by-turn only works if Maps thinks the device is already at the starting location. Since Location permission is off, it will only show a route preview.
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