Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ter-bridge into staging-np
  • Loading branch information
ijunaid committed Oct 31, 2023
2 parents c4028b8 + 3402066 commit 5c6a78c
Show file tree
Hide file tree
Showing 17 changed files with 797 additions and 756 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 23.8.4
* Fixed the exit AB request failure issue on iOS.
* Updated underlying Android SDK version to 23.8.3
* Underlying iOS SDK version is 23.8.3

## 23.8.4-np
* Fixed the exit AB request failure issue on iOS.
* Updated underlying Android SDK version to 23.8.3
* Underlying iOS SDK version is 23.8.3

## 23.8.3
* Added a call to enroll users to A/B tests when getting a remote config value: 'getValueAndEnroll'
* Added a call to enroll users to A/B tests when getting all remote config values: 'getAllValuesAndEnroll'
Expand All @@ -6,7 +16,7 @@

* Fixed sending '--' as carrier name due to platform changes from iOS version 16.4. This version and above will now not send any carrier information due to platform limitations.

* Updated underlying Android SDK version to 23.8.3
* Updated underlying Android SDK version to 23.8.3-RC1
* Updated underlying iOS SDK version to 23.8.3

## 23.8.3-np
Expand All @@ -17,7 +27,7 @@

* Fixed sending '--' as carrier name due to platform changes from iOS version 16.4. This version and above will now not send any carrier information due to platform limitations.

* Updated underlying Android SDK version to 23.8.3
* Updated underlying Android SDK version to 23.8.3-RC1
* Updated underlying iOS SDK version to 23.8.3

## 23.8.2
Expand Down Expand Up @@ -220,7 +230,7 @@
* !! Major breaking change !! Resolved issue with handling push notification actions on iOS.
* To handle push notification actions, add the following call "CountlyFlutterPlugin.startObservingNotifications();" to "AppDelegate.swift"
* For further information, refer to the "Handling Push Callbacks" section of the Countly SDK documentation at:
https://support.count.ly/hc/en-us/articles/360037944212-Flutter#handling-push-callbacks.
https://support.count.ly/hc/en-us/articles/360037944212-Flutter#h_01H930GAQ67F7994ZMTG30J1C5.
* Fixed a race condition bug in Android where a recorded event would have the wrong user properties in the drill database on the server. Now event queue is emptied (formed into a request) before recording any user profile changes.
* Events are now recorded with an internal ID in Android.
* Updated underlying Android SDK version to 22.09.0
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7ab95afb3da8421ab499cc921e1381ac)](https://www.codacy.com/gh/Countly/countly-sdk-flutter-bridge/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Countly/countly-sdk-flutter-bridge&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d7c460a23b694051ad08f3bb2e30808c)](https://app.codacy.com/gh/Countly/countly-sdk-flutter-bridge?utm_source=github.com&utm_medium=referral&utm_content=Countly/countly-sdk-flutter-bridge&utm_campaign=Badge_Grade)

# Countly Flutter SDK

Expand All @@ -12,13 +12,13 @@ Track, measure, and take action - all without leaving Countly.

* **Questions or feature requests?** [Join the Countly Community on Discord](https://discord.gg/countly)
* **Looking for the Countly Server?** [Countly Lite repository](https://github.com/Countly/countly-server)
* **Looking for other Countly SDKs?** [An overview of all Countly SDKs for mobile, web and desktop](https://support.count.ly/hc/en-us/articles/360037236571-Downloading-and-Installing-SDKs#officially-supported-sdks)
* **Looking for other Countly SDKs?** [An overview of all Countly SDKs for mobile, web and desktop](https://support.count.ly/hc/en-us/articles/360037236571-Downloading-and-Installing-SDKs#h_01H9QCP8G5Y9PZJGERZ4XWYDY9)

## Integrating Countly SDK in your projects

For a detailed description on how to use this SDK [check out our documentation](https://support.count.ly/hc/en-us/articles/360037944212-Flutter).
For information about how to add the SDK to your project, please check [this section of the documentation](https://support.count.ly/hc/en-us/articles/360037944212-Flutter#adding-the-sdk-to-the-project).
You can find minimal SDK integration information for your project in [this section of the documentation](https://support.count.ly/hc/en-us/articles/360037944212-Flutter#minimal-setup).
For information about how to add the SDK to your project, please check [this section of the documentation](https://support.count.ly/hc/en-us/articles/360037944212-Flutter#h_01H930GAQ59MD94NK0NP68GNGT).
You can find minimal SDK integration information for your project in [this section of the documentation](https://support.count.ly/hc/en-us/articles/360037944212-Flutter#h_01H930GAQ5RGKSA3CTNVTBTDZF).
For an example integration of this SDK, you can have a look [here](https://github.com/Countly/countly-sdk-flutter-bridge/tree/master/example).
This SDK supports the following features:
* [Analytics](https://support.count.ly/hc/en-us/articles/4431589003545-Analytics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
*/
public class CountlyFlutterPlugin implements MethodCallHandler, FlutterPlugin, ActivityAware, DefaultLifecycleObserver {
private static final String TAG = "CountlyFlutterPlugin";
private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.8.3";
private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.8.4";
private final String COUNTLY_FLUTTER_SDK_NAME = "dart-flutterb-android";
private final String COUNTLY_FLUTTER_SDK_NAME_NO_PUSH = "dart-flutterbnp-android";

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- countly_flutter_np (23.8.3):
- countly_flutter_np (23.8.4):
- Flutter
- Flutter (1.0.0)

Expand Down
35 changes: 21 additions & 14 deletions example/lib/config_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,33 @@ class CountlyConfiguration {
static final Map<String, String> userProperties = {'customProperty': 'custom Value', 'username': 'USER_NAME', 'email': 'USER_EMAIL'};
static final String campaignData = '{"cid":"PROVIDED_CAMPAIGN_ID", "cuid":"PROVIDED_CAMPAIGN_USER_ID"}';
static final Map<String, String> attributionValues = Platform.isIOS ? {AttributionKey.IDFA: 'IDFA'} : {AttributionKey.AdvertisingID: 'AdvertisingID'};
static final RCDownloadCallback callback = (rResult, error, fullValueUpdate, downloadedValues) {
if (error != null) {
print('RCDownloadCallback, Result:[$rResult], error:[$error]');
return;
}
String downloadedValuesString = '';
for (final entry in downloadedValues.entries) {
downloadedValuesString += '||key: ${entry.key}, value: ${entry.value.value}||\n';
}
String message = 'Manual Download, Result:[${rResult}, updatedAll:[${fullValueUpdate}], downloadedValues:[\n${downloadedValuesString}]';
print(message);
};

static CountlyConfig getConfig() {
return CountlyConfig(SERVER_URL, APP_KEY)..setLoggingEnabled(true) // Enable countly internal debugging logs

// Currently only logging is enabled for debugging purposes
// Below you can see most of the methods that you can use to configure the Countly SDK

// Remote Config related methods
//------------------------------------------------------------
// ..enableRemoteConfigAutomaticTriggers()
// ..enableRemoteConfigValueCaching()
// ..enrollABOnRCDownload() // This is for specific circumstances only
// ..remoteConfigRegisterGlobalCallback(callback) // Set Automatic value download happens when the SDK is initiated or when the device ID is changed.
//------------------------------------------------------------

// ..enableCrashReporting() // Enable crash reporting to report unhandled crashes to Countly
// ..setRequiresConsent(true) // Set that consent should be required for features to work.
// ..giveAllConsents() // Either use giveAllConsents or setConsentEnabled
Expand All @@ -36,23 +56,10 @@ class CountlyConfiguration {
// ..setUserProperties(userProperties)
// ..recordIndirectAttribution(attributionValues)
// ..recordDirectAttribution('countly', campaignData)
// ..remoteConfigRegisterGlobalCallback((rResult, error, fullValueUpdate, downloadedValues) {
// print('Global RC download callback 1');
// if (error != null) {
// print(error);
// }
// }) // Set Automatic value download happens when the SDK is initiated or when the device ID is changed.
// ..remoteConfigRegisterGlobalCallback((rResult, error, fullValueUpdate, downloadedValues) {
// print('Global RC download callback 2');
// if (error != null) {
// print(error);
// }
// }) // Set Automatic value download happens when the SDK is initiated or when the device ID is changed.
// ..setRecordAppStartTime(true) // Enable APM features, which includes the recording of app start time.
// ..setStarRatingTextMessage('Message for start rating dialog')
//..enrollABOnRCDownload() // This is for specific circumstances only
// ..setParameterTamperingProtectionSalt('salt') // Set the optional salt to be used for calculating the checksum of requested data which will be sent with each request
//..enableManualSessionHandling() // Enable manual session handling
// ..enableManualSessionHandling() // Enable manual session handling
// ..setHttpPostForced(false) // Set to 'true' if you want HTTP POST to be used for all requests
;
}
Expand Down
18 changes: 18 additions & 0 deletions example/lib/helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,21 @@ Widget countlySubTitle(String text) {
Widget countlyTitle(String text) {
return Text(text, style: titleStyle());
}

void showCountlyToast(BuildContext context, String message, Color? color) {
final snackBar = SnackBar(
content: Container(
// height: 60,
child: Center(
child: Text(
message,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
),
),
),
duration: Duration(seconds: 3),
backgroundColor: color ?? Color.fromARGB(255, 44, 174, 92),
behavior: SnackBarBehavior.floating,
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
Loading

0 comments on commit 5c6a78c

Please sign in to comment.