MapsApiSettings Stay organized with collections Save and categorize content based on your preferences.
Page Summary
MapsApiSettings provides entry points for adding configuration to the Maps API.
The addInternalUsageAttributionId method adds a usage attribution ID to help Google understand library and sample usage.
Adding a usage attribution ID is only supported by the LATEST renderer and requires calling MapsInitializer.initialize first.
Developers can opt out of sending the usage attribution ID by deleting the function call or using an empty string.
Provides entry points for adding configuration to the Maps API.
Public Method Summary
| static void | addInternalUsageAttributionId(Context context,String internalUsageAttributionId) Adds a usage attribution ID to the initializer, which helps Google understand which libraries and samples are helpful to developers, such as usage of a UI framework support library. |
Inherited Method Summary
Public Methods
public static voidaddInternalUsageAttributionId(Context context,String internalUsageAttributionId)
Adds a usage attribution ID to the initializer, which helps Google understand which libraries and samples are helpful to developers, such as usage of a UI framework support library. To opt out of sending the usage attribution ID, it is safe to delete this function call or replace the value with an empty string.
Note that this behavior is only supported by theMapsInitializer.Renderer.LATEST renderer. You should only call this method if you have first called MapsInitializer.initialize(Context, MapsInitializer.Renderer, OnMapsSdkInitializedCallback) with the latest renderer. The behavior is undefined if invoking this method without calling MapsInitializer.initialize(Context, MapsInitializer.Renderer, OnMapsSdkInitializedCallback) first or attempting to call this API on theMapsInitializer.Renderer.LEGACY renderer.
Parameters
| context | Required context. Must not benull. |
|---|---|
| internalUsageAttributionId | The internal usage attribution ID to add. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-14 UTC.