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
* All require up-to-date versions of the Android build tools and the Android support repository.
30
-
* The demo apps require that you add your own Google Maps API key. See [Get an API Key](docs/GET_AN_API_KEY.md) docs for more instructions.
30
+
* The demo apps require that you add your own Google Maps API key. See [Get an API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key) docs for more instructions.
Copy file name to clipboardExpand all lines: WearOS/README.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Wear OS Sample
2
2
===================================
3
3
4
-
This sample uses the [Google Maps Android API v2](https://developers.google.com/maps/documentation/android/)
4
+
This sample uses the [Google Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/wear)
5
5
to display a map on Wear OS. It shows the basic setup required for a
6
6
gradle-based Android Studio project that [supports ambient mode](https://developer.android.com/training/wearables/apps/always-on.html).
7
7
@@ -21,14 +21,21 @@ First download the samples by cloning this repository or downloading an archived
21
21
snapshot. (See the options at the top of the page.)
22
22
23
23
In Android Studio, use the "Import non-Android Studio project" or
24
-
"Import Project" option. Next select the ApiDemos/ directory that you downloaded
24
+
"Import Project" option. Next select the `WearOS/` directory that you downloaded
25
25
from this repository.
26
26
If prompted for a gradle configuration accept the default settings.
27
27
28
28
Alternatively use the "gradlew build" command to build the project directly.
29
29
30
-
Add your API key to the `local.properties` file and call it `GOOGLE_MAPS_API_KEY`.
31
-
See the [quick guide to getting an API key](https://developers.google.com/maps/documentation/android-api/signup).
30
+
See the [Get an API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key) guide to get an API key.
31
+
32
+
Open the `secrets.properties` file in your top-level directory, and then add the following code. Replace YOUR_API_KEY with your API key. Store your key in this file because secrets.properties is excluded from being checked into a version control system.
33
+
If the `secrets.properties` file does not exist, create it in the same folder as the `local.properties` file.
34
+
35
+
```
36
+
MAPS_API_KEY=YOUR_API_KEY
37
+
```
38
+
32
39
33
40
Support
34
41
-------
@@ -49,4 +56,4 @@ CONTRIBUTING.md.
49
56
License
50
57
-------
51
58
52
-
Please refer to the [LICENSE](https://github.com/googlemaps/android-samples/blob/main/LICENSE) at the root of this repo.
59
+
Please refer to the [LICENSE](https://github.com/googlemaps/android-samples/blob/main/LICENSE) at the root of this repo.
0 commit comments