You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,16 +61,26 @@ This repository includes a [sample app](demo) that illustrates the use of this l
61
61
62
62
To run the demo app, ensure you've met the requirements above then:
63
63
1. Clone the repository
64
-
1. Add a file `local.properties` in the root project (this file should *NOT* be under version control to protect your API key)
65
-
1. Add a single line to `local.properties` that looks like `MAPS_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained earlier
64
+
1. Add a file `secrets.properties` in the root project (this file should *NOT* be under version control to protect your API key)
65
+
1. Add the following keys to `secrets.properties`:
66
+
-`MAPS_API_KEY`: **Required**. Your Google Maps API Key. Ensure it has the **Maps SDK for Android** enabled.
67
+
-`PLACES_API_KEY`: **Optional**. Required for demos using the Places API (e.g., Heatmaps with Places). Ensure the **Places API** is enabled.
68
+
-`MAP_ID`: **Optional**. Required for demos using Advanced Markers or Cloud-based Map Styling.
69
+
70
+
For example:
71
+
```properties
72
+
MAPS_API_KEY=YOUR_MAPS_API_KEY
73
+
PLACES_API_KEY=YOUR_PLACES_API_KEY
74
+
MAP_ID=YOUR_MAP_ID
75
+
```
66
76
1. Build and run the `debug` variant for the Maps SDK for Android version
67
77
68
78
### Setting up the Map ID
69
79
70
80
Some of the features in the demo app, such as Advanced Markers, require a Map ID. You can learn more about map IDs in the [official documentation](https://developers.google.com/maps/documentation/android-sdk/map-ids/mapid-over). You can set the Map ID in one of the following ways:
71
81
72
82
1.**`secrets.properties`:** Add a line to your `secrets.properties` file with your Map ID:
73
-
```
83
+
```properties
74
84
MAP_ID=YOUR_MAP_ID
75
85
```
76
86
@@ -144,6 +154,24 @@ By default, the `Source` is set to `Source.DEFAULT`, but you can also specify `S
144
154
145
155
</details>
146
156
157
+
## Internal usage attribution ID
158
+
159
+
This library calls the `addInternalUsageAttributionId` method, which helps Google understand which libraries and samples are helpful to developers and is optional. Instructions for opting out of the identifier are provided below.
160
+
161
+
If you wish to disable this, you can do so by removing the initializer in your `AndroidManifest.xml` using the `tools:node="remove"` attribute:
Contributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].
* Initializes the AttributionId at application startup.
25
+
* Adds a usage attribution ID to the initializer, which helps Google understand which libraries and samples are helpful to developers, such as usage of this library.
26
+
* To opt out of sending the usage attribution ID, please remove this initializer from your manifest.
0 commit comments