customerio / customerio-flutter

Flutter plugin for Customer.io
https://www.customer.io/docs/sdk/flutter/getting-started/
MIT License
12 stars 10 forks source link

Android Devices Not Registered in Production Mode #113

Closed AristideVB closed 3 months ago

AristideVB commented 3 months ago

Issue Description

When using the Customer.io Flutter plugin, Android devices are correctly registered in debug mode but not in production. The same codebase registers devices on iOS in both debug and production modes without issues.

Steps to Reproduce

  1. Initialize Customer.io with the following configuration in the Flutter app:
    await CustomerIO.initialize(
     config: CustomerIOConfig(
       logLevel: kDebugMode ? CioLogLevel.debug : CioLogLevel.none,
       siteId: '[customerIOSiteId]',
       apiKey: '[customerIOApiKey]',
       region: Region.eu,
       enableInApp: true,
     ),
    );
  2. Identify the user:
    CustomerIO.identify(identifier: user.email);
  3. Call CustomerIO.messagingPush() to register the device for push notifications.

Expected Behavior

Devices should be registered in both debug and production modes on Android, similar to the behavior observed on iOS devices.

Actual Behavior

On Android, devices are only registered in debug mode. In production, the devices are not registered, leading to no push notifications being received.

Additional Context

Environment

AristideVB commented 3 months ago

Note I've upgrade to Gradle 8, could it be related ?

& I have been overriding the namespace dynamically as suggested https://github.com/customerio/customerio-flutter/issues/107#issuecomment-1910507373

AristideVB commented 3 months ago

Downgrading to Gradle 7.x fixed the issue in production, but we had to remove support for essential features in our app because of this downgrade...

Please upgrade the plugin to Gradle 8.x and having registerDevice work correctly on Android in production https://github.com/customerio/customerio-flutter/issues/107

levibostian commented 3 months ago

Thank you for sharing this issue with us. Sorry for the frustration caused by this.

I have added a +1 to our internal ticket for Gradle 8 support. Unfortunately, we do not have a release date for this support. Know that we are discussing it and will continue to prioritize it internally.

Thank you again for sending this issue to us. Especially with all the very helpful details!

I hope you have a great day.

mrehan27 commented 2 months ago

More updates have been released in version 1.4.0, and the package is now fully compatible with Gradle 8. Please update to the latest version and let us know if you encounter any issues.