Skip to content

Commit

Permalink
Add the GoogleServices preference since cordova-android supports it
Browse files Browse the repository at this point in the history
wrt
e-mission/e-mission-docs#554 (comment)

the native instructions suggest adding it to build.gradle
So I looked at `build.gradle` and found

```
if (cdvHelpers.getConfigPreference('GradlePluginGoogleServicesEnabled', 'false').toBoolean()) {
    apply plugin: 'com.google.gms.google-services'
}
```

That just clarified that we don't have to wait for the plugins to edit the config file,
we can just edit the config file directly.

After adding the preferences, I don't get the push notification error on startup, AND

```
platforms/android/app//build/generated/res/google-services/debug/values/values.xml
```

has the appropriate value.

This should be the last pending issue
  • Loading branch information
shankari committed Aug 1, 2020
1 parent c0c338f commit 8ce402b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.cordovabuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<preference name="android-minSdkVersion" value="22" />
<preference name="BackupWebStorage" value="none" />
<preference name="emSensorDataCollectionProtocolApprovalDate" value="2016-07-14" />
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
<preference name="GradlePluginGoogleServicesVersion" value="4.3.3" />
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
Expand Down

0 comments on commit 8ce402b

Please sign in to comment.