Add multiple stops to Google navigation using Universal URL schemes - ios

Is there a way to launch Google Maps app on iOS with multiple stops using Google Maps URL Scheme?

Well we need to append to: parameter for each location. The url scheme will be as follows:
from your current location
comgooglemaps://?daddr=Lat,Lon+to:Lat,Lon+to:Lat,Lon+to:...
if you have source location
comgooglemaps://?saddr=Lat,Lon&daddr=Lat,Lon+to:Lat,Lon+to:Lat,Lon+to:...

Related

Swift - OpenUrl for Google map doesn't show the direction (loading forever)

I'm working on an iOS app where I need to open Google Maps to navigate to a location. I'm using the Scheme for iOS comgooglemaps:\\
Here is my code :
guard let url = URL(string: "comgooglemaps://?saddr=&daddr=\(latitude),\(longitude)&directionsmode=\(travelMode)"), UIApplication.shared.canOpenURL(url) else {
return
}
UIApplication.shared.open(url)
But the problem is, once on Google Maps, the route is not showing on the map and Google Maps is loading forever if Google Maps wasn't already started. I'm using iOS 14.4.1.
This happen using the current user location and I need it
Edit for Universal Link: That's an idea too and I forgot to precise that I test it but there is a bug too. When the user doesn't accept location on Google Maps, instead of asking to complete the form for the origin point and set the destination, Google Maps return a totally blank form. On Android, the destination is set.
As per documentation, you can also use https:// links, as Maps support universal links. This seems to work fine, even while the comgooglemaps:// url fails to load directions. Check docs for information on individual parameters. Here's an example matching your query:
https://www.google.com/maps/dir/?api=1&destination=\(latitude),\(longitude)&travelmode=\(travelMode)

Using Callback for url schemes on Google Maps for iOS

I'm trying to use the callback functionality of the URL schemes for Google Maps on iOS.
The way how to do that is documented here.
However, I did not manage to get this to work. There is no additional symbol showing up as described in the documentation.
Is this actually still possible or has this feature been removed?
Independent of my application, I also tested this by pasting the URL scheme in the Safari browser, but it doesn't work there either.
It simply starts the Google Maps app but apparently ignores the callback parameters.
Edit:
This is the URL from the example of the documentation:
comgooglemaps-x-callback://?center=40.765819,-73.975866&zoom=14
&x-success=sourceapp://?resume=true
&x-source=SourceApp
The only difference would be that the success parameter gets the URL of the app you want to open when the user clicks on the callback button.
Check if your application's url scheme has been implemented correctly and that you're specifying a valid callback url (that directs back to your app).
Some links that might be useful:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

iOS: Pin an image & url into the Pinterest App via URL Scheme

I have an imageURL, and a weblinkURL that is to be shared. I want to open the Pinterest app automatically via url scheme, and pass these parameters so that this is possible.
Is there any legit url schemes out there?
Yes, I did check their dev page: https://developers.pinterest.com/docs/getting-started/introduction/, they have an SDK, but I want a simple url scheme. I don't want to do the integration.
(It looks like few other apps can do this now - what is the right way to do this?)
Pin
pinterest://pin/285063851385287883/
Board
pinterest://board/meaghanror/cats-cats-cats/
User
pinterest://user/carlrice/
Source: Custom URL scheme for Pinterest on iOS Safari to open board URL?

Back button on google maps ios

My Iphone app needs to open the google maps application to use the StreetView and the directions mode.
All works fine,But my question is, is there any way of adding a button or something to go back to my app?. I have seen that with UIWebViews maybe thats the only solution..
Thanks in advance
My answer comes from this documentation: Google Maps SDK for iOS, Google Maps URL Scheme
You may add a back button if you register a custom URL scheme for your app and use the comgooglemaps-x-callback:// url scheme to launch the Google Maps iOS app.
Here is a great tutorial for iOS Custom URL Schemes.
The following string would open Google Maps with directions to JFK airport and would add a button in Google Maps with the title "AirApp".
Touching that button would call the custom url scheme sourceapp:// which you would set up by following the tutorial I linked to above.
#"comgooglemaps-x-callback://?daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&x-success=sourceapp://?resume=true&x-source=AirApp"

Get Box iOS app url scheme parameters for a web app

Is it possible for a web app to make use of the box:// url-scheme with parameters to open a specific file in the Box iOS app?
The Android Box app has a similar function with its intent links.
And if it is possible, what would these parameters be? (already using Oauth2 API to list files with shared links).
boxopendirect://file?id=<fileid> to redirect to a file.
boxopendirect://folder?id=<folderid> to redirect to a folder
It certainly is possible to open other apps from inside a webapp using a proprietary scheme identifier. Unfortunately, you will need to know the exact scheme syntax in advance. There's a good list of them available here:
http://wiki.akosma.com/IPhone_URL_Schemes
For example, to open the youtube app directly, you can use:
youtube://

Resources