sefidgaran / salesforce-marketing-cloud

Salesforce Marketing Cloud MobilePush Flutter SDK
https://pub.dev/packages/sfmc_plugin
MIT License
6 stars 21 forks source link

Unable to initialize plugin on Android #14

Closed D41111410 closed 1 year ago

D41111410 commented 1 year ago

Hello,

I am unable to initialize the plugin on Android. On iOS, everything works as expected. I have followed the instructions and checked a handful of times already.

For Android:

  1. Firebase is set up
  2. Google-services.json is in android/app
  3. In android/app/build.gradle I have added apply plugin: 'com.google.gms.google-services'
  4. In android/build.gradle I have added under dependencies com.google.gms:google-services:4.3.15
  5. I have added my configurations to android/gradle.properties as instructed.

When launching my app, there's no indication that the SDK is initialized as it does in iOS. There are no logs with the tag MCSDK at all. Invoking any of the SfmcPlugin() methods doesn't seem to do anything either.

Any ideas, tips, thoughts on how I may proceed or if I'm missing something?

sefidgaran commented 1 year ago

Hello

Please follow and cross check the example provided carefully. I guess your application name should not be set in your project manifest, please double check.

https://github.com/sefidgaran/salesforce-marketing-cloud/blob/main/src/example/android/app/src/main/AndroidManifest.xml

D41111410 commented 1 year ago

Thank you that was my issue!