- Overview
- Necessary steps
- Step 1: Install the Google Play Services SDK
- Step 2: Get a key for using the library
Android: Conditions for using the Map control
Up to version 180046 of WINDEV Mobile, the Google Maps API v1 library was required to use a Map control in an Android application. This library is pre-installed on most of the phones and tablets. All you have to do is get a key generated from the certificate used to sign the application in order to use it in the application. For more details, see Conditions for using a Map control before version 180056. The version 1 of this library was depreciated by Google on December 3, 2012. From March 3 2013, it will no longer be possible to generate new keys in order to use the library in version 1. However, the existing applications will continue to operate ; you will have the ability to re-use the keys previously generated in other applications providing that they are signed with the same certificate as the one used to generate the key. From version 180056 of WINDEV Mobile: From March 3 2013, the version 2 of the library will have to be used for the applications that do not include a Google Maps API v1 key.
The steps for using this new library in an Android application are different and more complicated. This help page presents the different steps. Step 1: Install the Google Play Services SDK The Google Play Services SDK can be downloaded and installed from the SDK Manager of Android: - Run the SDK Manager.exe executable found in the setup directory of the Android SDK (we advise you to start it as administrator).
- In the list of packages, select "Extra/Google Play services".
- Click the setup button.
Step 2: Get a key for using the library To access the Google Maps data via the Map control, you must generate a key that will be included in the manifest of the generated application. This key is free of charge, without restriction regarding the number of applications or the number of users. The Google Maps API v2 library uses a management system of the key that differs from the one used in version 1 of the library. The keys generated for the earlier version are not compatible with this new system. Obtaining a key is performed from the management console of the Google API keys from the certificate used to sign the application and from its package name and it is done in several steps. 1. Retrieving the SHA-1 print of certificate The generation wizard for Android applications containing a Map control automatically retrieves a SHA-1 print of the certificate.
2. Creating a "project API"Follow these steps: - From a browser, open the page of the Google API console.
- Authenticate using a Google Account.
- Create a new API Project project or use an existing project.
- In the list of APIs associated with the project, enable the Google Maps Android API v2 service by positioning the switch to ON.
- Accept the use conditions of the service.
3. Generating the key Follow these steps: - In the Google API console, click "Credentials".
- Click "CREATE NEW KEY".
- In the popup window that appears, click "Android key".
- Paste the SHA-1 print of the certificate (generated by WINDEV Mobile).
- Retrieve the generated key in the "Key for Android apps (with certificates)" section.
- The key can be copied into the wizard for generating the Android application.
|
|
|
|