ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Map control
  • Overview
  • Necessary steps
  • Step 1: Install the Google Play Services SDK
  • Step 2: Get a key for using the library
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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.
Necessary steps
Several steps are required to use the Google Maps API v2 library in an Android application. Most of these steps must be performed once only.
  1. Install the Google Play Services SDK.
  2. Get a key for using the library.
  3. Copy the key into the wizard for generating the Android application.
Step 1: Install the Google Play Services SDK
The Google Play Services SDK can be downloaded and installed from the SDK Manager of Android:
  1. Run the SDK Manager.exe executable found in the setup directory of the Android SDK (we advise you to start it as administrator).
  2. In the list of packages, select "Extra/Google Play services".
  3. 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:
  1. From a browser, open the page of the Google API console.
  2. Authenticate using a Google Account.
  3. Create a new API Project project or use an existing project.
  4. In the list of APIs associated with the project, enable the Google Maps Android API v2 service by positioning the switch to ON.
  5. Accept the use conditions of the service.
3. Generating the key
Follow these steps:
  1. In the Google API console, click "Credentials".
  2. Click "CREATE NEW KEY".
  3. In the popup window that appears, click "Android key".
  4. Paste the SHA-1 print of the certificate (generated by WINDEV Mobile).
  5. Retrieve the generated key in the "Key for Android apps (with certificates)" section.
  6. The key can be copied into the wizard for generating the Android application.
Minimum version required
  • Version 18
Comments
Click [Add] to post a comment

Last update: 08/30/2022

Send a report | Local help