Skip to content

Commit 9c264cf

Browse files
committed
Merge branch 'breningham-master'
2 parents 1d0bcca + 38e7970 commit 9c264cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4009
-31
lines changed

.gitignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Logs
44
logs
55
*.log
6-
*.js
6+
**/*.js
77
!/demo/**/*.js
88

99
# Runtime data
@@ -36,7 +36,7 @@ build/Release
3636
# Dependency directory
3737
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
3838
node_modules
39-
39+
**/node_modules
4040

4141
### JetBrains template
4242
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
@@ -87,3 +87,10 @@ com_crashlytics_export_strings.xml
8787
crashlytics.properties
8888
crashlytics-build.properties
8989
/demo/lib/
90+
91+
# Plugin Scripts
92+
!src/scripts/*.js
93+
94+
# Publish Scripts
95+
publish/package-lock.json
96+
publish/package

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,43 @@ Live Demo [here](https://tinyurl.com/m7ndp7u)
3939

4040
## Setup Android API Key
4141

42+
43+
44+
### Nativescript < 4
45+
4246
First copy over the template string resource files for Android
4347

4448
```
4549
cp -r node_modules/nativescript-google-maps-sdk/platforms/android/res/values app/App_Resources/Android/
4650
```
47-
4851
Next modify the file at `app/App_Resources/Android/values/nativescript_google_maps_api.xml`, uncomment `nativescript_google_maps_api_key` string and replace `PUT_API_KEY_HERE` with your api key.
4952

53+
Then, in your `AndroidManifest.xml` located at `app/App_Resources/Android/AndroidManifest.xml` insert into your `<application>` tags
54+
55+
```(xml)
56+
<meta-data
57+
android:name="com.google.android.geo.API_KEY"
58+
android:value="@string/nativescript_google_maps_api_key" />
59+
```
60+
61+
### Nativescript 4+
62+
63+
First copy over the template string resource files for Android
64+
65+
```
66+
cp -r node_modules/nativescript-google-maps-sdk/platforms/android/res/values app/App_Resources/Android/src/main/res
67+
```
68+
69+
Next modify the file at `app/App_Resources/Android/src/main/res/values/nativescript_google_maps_api.xml`, uncomment `nativescript_google_maps_api_key` string and replace `PUT_API_KEY_HERE` with your api key.
70+
71+
Then, in your `AndroidManifest.xml` located at `app/App_Resources/Android/src/main/AndroidManifest.xml` insert into your `<application>` tags
72+
73+
```(xml)
74+
<meta-data
75+
android:name="com.google.android.geo.API_KEY"
76+
android:value="@string/nativescript_google_maps_api_key" />
77+
```
78+
5079
The plugin will default to latest available version of the Android `play-services-maps` SDK. If you need to change the version, you can add a project ext property `googlePlayServicesVersion` like so:
5180

5281
```

demo/app/App_Resources/Android/AndroidManifest.xml renamed to demo/app/App_Resources/Android/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,9 @@
3737
</intent-filter>
3838
</activity>
3939
<activity android:name="com.tns.ErrorReportActivity"/>
40+
41+
<meta-data
42+
android:name="com.google.android.geo.API_KEY"
43+
android:value="@string/nativescript_google_maps_api_key" />
4044
</application>
4145
</manifest>

0 commit comments

Comments
 (0)