andre-paraense / launchdarkly_flutter

A LaunchDarkly Flutter SDK
GNU Lesser General Public License v3.0
4 stars 5 forks source link

Android S+ (version 31 and above) exception #40

Closed davidbrenner closed 1 year ago

davidbrenner commented 1 year ago

Describe the bug

When using the plugin with Android version S+ (api 31+), I get the following exception as the android plugin fails to load:

E/MethodChannel#launchdarkly_flutter(13714): java.lang.IllegalArgumentException: com.example.app: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

I think it is simply a matter of bumping the version number in build.gradle: 'com.launchdarkly:launchdarkly-android-client-sdk:3.0.0'

Based on this bug: https://github.com/launchdarkly/android-client-sdk/issues/133 looks like bumping up to sdk v3.0.1 will fix this error.

The latest version is 3.2.2 - I'll take a look at the changelog and see if there are any breaking changes and then submit a PR.

davidbrenner commented 1 year ago

PR already exists for this: https://github.com/andre-paraense/launchdarkly_flutter/pull/39

+1 to merging it :)

davidbrenner commented 1 year ago

Decided to instead use the official library. @andre-paraense - can mark this library as discontinued on pub.dev and point people to the official client sdk:https://github.com/launchdarkly/flutter-client-sdk docs: https://docs.launchdarkly.com/sdk/client-side/flutter

How to mark as discontinued: https://dart.dev/tools/pub/publishing#discontinue

andre-paraense commented 1 year ago

Great ideia. I have marked the package as discontinued and suggested as replacement the official client SDK.