Google Maps, no navigation launch option, only preview

In my application, I launch Google Navigation using the following code set.

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 pass Source Lat / Lng and Destination Lat / Lng the corresponding addresses.

Problem: - My problem here is that when you open the navigation screen there is no "Start" option, but there is another "Preview" option. This problem does not occur in all places where it works great in some places, but not for everyone. Can I find out what a mess is?

thanks

+8
android google-maps
source share
4 answers

I did some research on this, and there seems to be no way around it. A preview button will appear wherever navigation is not available for the requested route, the only reliable source I could find (Google is not very useful for this) to prove that it is here that says (under navigation):

To start step-by-step navigation, click the "Start navigation" button, represented by a chevron in the lower right corner of the screen. When “Navigation” is not available, the icon will appear as a preview arrow, and you can see the steps step by step.

The only thing I would like to do is somehow check if navigation on this route is really accessible before switching to the map application, and if not, display a prompt to the user, but I don’t know the android API well enough to provide any help here.

A list of supported countries and territories is available here.

Hope this helps.

+3
source share

A little late in the battle, I had the same problem, while my application implementation, when I could not view the navigation in real time using the Google Map Client.

Glympse came to my mind at that time, and this is a very effective approach when dealing with these types of real-time scripts. Here is the implementation code:

 GTicketLite ticket = LiteFactory.createTicket(3600000, "Going home!", null); // Set flags that adjust the presentation of the Glympse Send Wizard. // These can enable/disable fields in the wizard screen. final int WIZARD_FLAGS = LC.SEND_WIZARD_INVITES_EDITABLE | LC.SEND_WIZARD_MESSAGE_EDITABLE | LC.SEND_WIZARD_DESTINATION_EDITABLE | LC.SEND_WIZARD_TIME_EDITABLE; // Launches the wizard which will send the Glympse GGlympseLite glympse = GlympseLiteWrapper.instance().getGlympse(); glympse.sendTicket(ticket, WIZARD_FLAGS); 

The whole Android SDK is provided through the website, and its step-by-step procedure is also provided. Try it and let me know if this helped you.

thanks

+1
source share

This worked for me:

"For everyone who encounters this thread, I have discovered the cause and solution to this problem in some cases.

When searching for a location using google.com or the Google application, click the direction button, the starting and ending points will be transferred to the Google Maps application. When you select a route and see only the preview option, it is because google.com/app passed the initial coordinate set to the map application, so your Google search maps provide routes between two points, not the current location. Thus, there is no turning behind the move. Just tap the launch field and select your current location, bam. "

+1
source share

You can only move from where you are. If you are looking for a route from another starting point to the place where you are at a given time, you can only see a preview. As soon as you are at the initial stage, it will move.

Hope this makes sense.

0
source share

All Articles