To use an Android device, follow the instructions at.To run an app that uses the Maps SDK for Android, you must deploy it to an Android device or AndroidĮmulator that is based on Android 4.0 or higher and includes the Google APIs. The following declaration within the element ofĪndroidManifest.xml. Your app is targeting API level 28 (Android 9.0) or above, you must include If you are using :play-services-maps:16.0.0 or below and If you're targetingĮarlier versions of the Google Play services SDK, you must request the You don't need the WRITE_EXTERNAL_STORAGE permission. If you're targeting version 8.3 or later of the Google Play services SDK, To request the ACCESS_FINE_LOCATION permission, add this code to the Note: The quickstart has ACCESS_FINE_LOCATION enabled. The options areĪCCESS_FINE_LOCATION, which provides the precise device location, andĪCCESS_COARSE_LOCATION, which is less precise. Location permission in your AndroidManifest.xml file. If your app needs to access the user's location, you need to request the The version of Google Play services that the app was compiled with. Google Play services version numberĪdd the following declaration within the application element. This section describes the settings to add to yourĪndroidManifest.xml file. Specify only one of the API key metadata names. Name allows authentication to the Android Maps API v2 only. For backwards compatibility, the API also Google Maps-based APIs on the Android platform, including the A key with this name can be used to authenticate to multiple IgnoreList.add("sdk.*") // Ignore all keys matching the regexp "sdk.*"Ĭom._KEY is the recommended metadata nameįor the API key. IgnoreList.add("keyToIgnore") // Ignore the key "keyToIgnore" Configure which keys should be ignored by the plugin by providing regular expressions. This file can beĭefaultPropertiesFileName = "" A properties file containing default secret values. PropertiesFileName = "secrets.properties" The plugin defaults to "local.properties" Optionally specify a different file name containing your secrets. In Android Studio, open your project-level adle file and add the followingĬode to the dependencies element under buildscript. To install the Secrets Gradle Plugin for Android in your Google Maps project: Note: See theĭocumentation on GitHub for the latest system requirements and installation instructions. To streamline this task, we recommend that you use the For more information about the secrets.properties file, see Storing it in the secrets.properties file, which is located in the root directory of your You should not check your API key into your version control system, so we recommend This section describes how to store your API key so that it can be securely referenced by
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |