I am writing a simple application using Ionic2 and Angular2.
I just want to type an address in my app, and then go to Google App on my phone
(I don't want to have map in my app just open another app).
I read that it is possible using linkLondon
which works perfectly in webApp.
Is it a possible to use it in a Mobile app?
I am taking you would like to open Google Maps App to navigate to a place based on the link you have given.
You can use this plugin: https://github.com/dpa99c/phonegap-launch-navigator
and call it like this: launchnavigator.navigate("London, UK"); to navigate to a destination address from current location. Other API calls can be found in the readme file.
Related
Currently, we have a mobile App that is storing data into a Google Drive folder using the scope
https://www.googleapis.com/auth/drive.file
View and manage Google Drive files and folders that you have opened or created with this app
Now we are planning to add a web app as well. The problem is, that the web app cannot access files uploaded by the mobile app and vice versa.
So is there a way to tell the Google Drive API that those two apps (web app and the mobile app) are in fact the 'same' application?
I want to avoid using the scope for full access to the user's Google Drive.
https://www.googleapis.com/auth/drive
Or is there another way that both apps can read/write the same folder?
Thanks in advance.
I also took a look at the Google Picker API but it does not seem to be what I want.
Posting this for documentation purposes.
As mentioned in comments, both apps should be part of the same Google Cloud Platform project, that's the only way to "tell" the API that they are the same application.
If they are not part of the same project, you should use the drive scope instead.
I'm trying to launch the google maps app with a Chrome intent just like web app of maps does it, this URI works but I don't know how I can pass the params correctly, I don't know what is 12z/data for example
intent://maps.app.goo.gl/?link=https://www.google.com.mx/maps/dir//Texcoco%2BCentro,%2BJard%25C3%25ADn%2BMunicipal%2BConstitucion,%2BCentro,%2BTexcoco,%2BEstado%2Bde%2BM%25C3%25A9xico/#19.5304781,-98.8971503,12z/data%3D!4m6!4m5!1m0!1m2!1m1!1s0x85d1e7a7a346c29d:0x9022698255f42430!3e0!11m1!6b1?entry%3Dml&apn=com.google.android.apps.maps&amv=914018424&isi=585027354&ibi=com.google.Maps&ius=comgooglemapsurl&utm_campaign=ml_promo&ct=ml-nav-nopromo-dr&mt=8&pt=9008&efr=1#Intent;package=com.google.android.gms;scheme=https;end;
Currently i am working with ionic 3 project.
I have latitude and longitudes of particular location and want to get root of that location using google map Mobile Application, Just want to open that location by navigating to google map app.
do anyone here with any suggestions or idea ?
Thanks
As of 2017 the recommended by Google method is the Google Maps URLs:
https://developers.google.com/maps/documentation/urls/guide#directions-action
You can create a cross-platform universal URL for Google directions following the documentation and use the URL in your intents. For example the URL might be something like
https://www.google.com/maps/dir/?api=1&destination=60.626200,16.776800&travelmode=driving
You can use Ionic Native Launch Navigator now to load the native maps app to a destination. You can specify the app launchnavigator.APP.GOOGLE_MAPS or the user can specify.
Pass the lat long as first argument as shown here
this.launchNavigator.navigate([50.279306, -5.163158], options)
.then(
success => console.log('Launched navigator'),
error => console.log('Error launching navigator', error)
);
The recommended by Google way is using the Google Maps URLs API:
https://developers.google.com/maps/documentation/android-api/intents
Using Maps URLs, you can build a universal, cross-platform URL to launch Google Maps and perform searches, get directions and navigation, and display map views and panoramic images. These universal URLs allow for broader handling of the maps requests no matter which platform the user is on.
I am hoping to programatically open a drive file with a particular app using the Google drive APIs.
The aim is to mimic the GUI drive method of launching an app using the "Open With" context menu for a selected file.
While I can get a list of the available apps using apps list method, the app resource doesn't detail the Open URL as far as I can work out.
Does anyone know if it is possible to obtain the Open URL using the APIs?
I believe if you have the scope set for drive.apps.readonly you should be able to use the File method getOpenWithLinks to discover the URLs. Just testing it now, the getOpenWithLinks method isn't available on the File class. I wonder if it has been deprecated? Certainly I can't find evidence of it being so.
https://developers.google.com/resources/api-libraries/documentation/drive/v2/java/latest/com/google/api/services/drive/model/File.html#getOpenWithLinks()
Revision: the getOpenWithLinks methods are available again in revision 75 of the v2 drive API.
I am developing a desktop application with Eclipse RCP using Google Directions API, where giving source and destination would result in directions.
But when I use this API "http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal" I am returned a JSON file to save. But I need to display the directions in a view inside a perspective. How can I display it in a view?
Also, I am currently using a Browser class to display the whole browser in a view. Can anyone tell me if it is possible to only display Maps in the view instead of the whole browser instance?
Add your browser View to your perspective. You need to provide origin and destination and excute java script to make browser to get the route information. In any case if you need to inform the RCP view once the page is loaded, you could use BrowserFucntion class.