Fix Google Maps and FCM Conflict on Ionic

This will be a quick and short as it is intended as my quick reference.

Google Maps and FCM on Ionic does not work well together, they have different shared dependencies version, and it does cause a lot of mess.

Here are the steps on how I fixed it:

  1. Edit customer-FCMPlugin.gradle.
  2. Remove classpath for google-services
  3. Remove applied plugin
  4. Update FCM plugin accordingly, my case 16.0.1
  5. Open FCM plugin.xml
  6. Update framework version
  7. Remove platform android
  8. Readd platform android
  9. Try running
  10. If it crashed, it probably Firebase not initialized yet error.
  11. Open MainActivity.java generated by cordova, initialize Firebase manually.
  12. Open values.xml inside resources.
  13. Add <string name="google_app_id" templateMergeStrategy="preserve" translatable="false">***</string>
  14. “client”: [{“client_info”: {“mobilesdk_app_id”: this value

--

--

--

Software Engineer at Taxfix (https://taxfix.de) - Software engineer, writer, designer, and artist.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aditya Purwa

Aditya Purwa

Software Engineer at Taxfix (https://taxfix.de) - Software engineer, writer, designer, and artist.

More from Medium

Android AES Cipher Encryption/Decryption - compatible with Node.js and Angular

App Storage Options

State management in a Flutter app vs in a Kotlin app. MVI and Clean Code included.

How to upload images to AWS S3 from the Android app.