From 5bc12cd4995d7fdf8132b331da11cfb6e34a043a Mon Sep 17 00:00:00 2001 From: "courier-android-automation[bot]" Date: Wed, 27 May 2026 19:45:56 +0000 Subject: [PATCH 1/3] Bump courier-android to 6.1.0 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 9f8d571..a0dfea4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -56,7 +56,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.11.0' // Courier Core SDK - api 'com.github.trycourier:courier-android:6.0.0' + api 'com.github.trycourier:courier-android:6.1.0' // Firebase Messaging (needed to resolve RemoteMessage from Courier SDK APIs) compileOnly 'com.google.firebase:firebase-messaging:23.4.1' From 213cffe8340e12872fb4b898cde715404cda3fbe Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 27 May 2026 16:02:04 -0400 Subject: [PATCH 2/3] Align ExampleService with courier-android 6.1.0 and bump example build Present the demo notification before calling Courier.onMessageReceived so the notification renders even if delivery tracking is slow or fails. Mirror the comment style used in courier-react-native#55. Update the Android push notification docs to the same order and bump example app build number to 1.0.0+31. Co-authored-by: Cursor --- Docs/3_PushNotifications.md | 8 ++++---- .../com/courier/courier_flutter/ExampleService.kt | 12 ++++++------ example/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Docs/3_PushNotifications.md b/Docs/3_PushNotifications.md index 15e019f..23876e6 100644 --- a/Docs/3_PushNotifications.md +++ b/Docs/3_PushNotifications.md @@ -323,9 +323,6 @@ class YourNotificationService : FirebaseMessagingService() { override fun onMessageReceived(message: RemoteMessage) { super.onMessageReceived(message) - // Notify the Courier SDK that a push was delivered - Courier.onMessageReceived(message.data) - // Create the PendingIntent that runs when the user taps the notification // This intent targets your Activity and carries the original message payload // TODO: Remove this if you'd like. This is mostly useful for demo purposes. @@ -343,7 +340,10 @@ class YourNotificationService : FirebaseMessagingService() { title = message.data["title"] ?: message.notification?.title, body = message.data["body"] ?: message.notification?.body, ) - + + // Notify the Courier SDK that a push was delivered + Courier.onMessageReceived(message.data) + } override fun onNewToken(token: String) { diff --git a/example/android/app/src/main/kotlin/com/courier/courier_flutter/ExampleService.kt b/example/android/app/src/main/kotlin/com/courier/courier_flutter/ExampleService.kt index b91dd5b..e72f21f 100644 --- a/example/android/app/src/main/kotlin/com/courier/courier_flutter/ExampleService.kt +++ b/example/android/app/src/main/kotlin/com/courier/courier_flutter/ExampleService.kt @@ -26,12 +26,6 @@ class ExampleService : FirebaseMessagingService() { override fun onMessageReceived(message: RemoteMessage) { super.onMessageReceived(message) - // Required — Tells the Courier SDK a push was delivered. - // Behind the scenes this posts the trackingUrl from the FCM data payload - // as a DELIVERED event so delivery analytics appear in the Courier dashboard, - // and fires any onPushDelivered listeners registered from the Dart layer. - Courier.onMessageReceived(message.data) - // --- Demo notification code (replace with your own for production) ----------- // // CourierPushNotificationIntent is a convenience wrapper that bundles the @@ -54,6 +48,12 @@ class ExampleService : FirebaseMessagingService() { body = message.data["body"] ?: message.notification?.body, ) + // Required — Tells the Courier SDK a push was delivered. + // Behind the scenes this posts the trackingUrl from the FCM data payload + // as a DELIVERED event so delivery analytics appear in the Courier dashboard, + // and fires any onPushDelivered listeners registered from the Dart layer. + Courier.onMessageReceived(message.data) + } override fun onNewToken(token: String) { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 2d84fce..9209922 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -5,7 +5,7 @@ description: Demonstrates how to use the courier_flutter plugin. # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.0+30 +version: 1.0.0+31 environment: sdk: '>=3.3.0 <4.0.0' From 5e32d10b19e1df7a4902e0c316c88930936c3a35 Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 27 May 2026 16:02:40 -0400 Subject: [PATCH 3/3] Release courier_flutter 5.0.1 Bump the package version to 5.0.1, update the Android/iOS user-agent strings to 5.0.1, and bump the example app build number to 1.0.0+32. Co-authored-by: Cursor --- .../com/courier/courier_flutter/CourierFlutterActivity.kt | 2 +- .../courier/courier_flutter/CourierFlutterFragmentActivity.kt | 2 +- .../main/kotlin/com/courier/courier_flutter/CourierPlugin.kt | 2 +- example/pubspec.yaml | 2 +- ios/Classes/CourierFlutterDelegate.swift | 2 +- ios/Classes/CourierFlutterMethodHandler.swift | 2 +- pubspec.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterActivity.kt b/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterActivity.kt index fac96c5..484dfa3 100644 --- a/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterActivity.kt +++ b/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterActivity.kt @@ -20,7 +20,7 @@ open class CourierFlutterActivity : FlutterActivity() { super.onCreate(savedInstanceState) // Setup and run the agent - Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.0") + Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.1") Courier.initialize(context) // Handle system events diff --git a/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterFragmentActivity.kt b/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterFragmentActivity.kt index a6b7e87..19eaa53 100644 --- a/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterFragmentActivity.kt +++ b/android/src/main/kotlin/com/courier/courier_flutter/CourierFlutterFragmentActivity.kt @@ -20,7 +20,7 @@ open class CourierFlutterFragmentActivity : FlutterFragmentActivity() { super.onCreate(savedInstanceState) // Setup and run the agent - Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.0") + Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.1") Courier.initialize(this) // Handle system events diff --git a/android/src/main/kotlin/com/courier/courier_flutter/CourierPlugin.kt b/android/src/main/kotlin/com/courier/courier_flutter/CourierPlugin.kt index 8376a19..9c31fcb 100644 --- a/android/src/main/kotlin/com/courier/courier_flutter/CourierPlugin.kt +++ b/android/src/main/kotlin/com/courier/courier_flutter/CourierPlugin.kt @@ -13,7 +13,7 @@ internal class CourierPlugin : FlutterPlugin { } init { - Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.0") + Courier.agent = CourierAgent.FlutterAndroid(version = "5.0.1") } override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9209922..967a732 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -5,7 +5,7 @@ description: Demonstrates how to use the courier_flutter plugin. # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.0+31 +version: 1.0.0+33 environment: sdk: '>=3.3.0 <4.0.0' diff --git a/ios/Classes/CourierFlutterDelegate.swift b/ios/Classes/CourierFlutterDelegate.swift index 8b08564..8bfd66e 100644 --- a/ios/Classes/CourierFlutterDelegate.swift +++ b/ios/Classes/CourierFlutterDelegate.swift @@ -41,7 +41,7 @@ open class CourierFlutterDelegate: FlutterAppDelegate { super.init() // Set the api agent version - Courier.agent = CourierAgent.flutterIOS("5.0.0") + Courier.agent = CourierAgent.flutterIOS("5.0.1") // Handle notification registration app.registerForRemoteNotifications() diff --git a/ios/Classes/CourierFlutterMethodHandler.swift b/ios/Classes/CourierFlutterMethodHandler.swift index fc6e36a..c8ab8bf 100644 --- a/ios/Classes/CourierFlutterMethodHandler.swift +++ b/ios/Classes/CourierFlutterMethodHandler.swift @@ -14,7 +14,7 @@ public class CourierFlutterMethodHandler: NSObject { // Set the flutter ios user agent // This ensures all the requests are tagged with this agent - Courier.agent = CourierAgent.flutterIOS("5.0.0") + Courier.agent = CourierAgent.flutterIOS("5.0.1") } diff --git a/pubspec.yaml b/pubspec.yaml index e518cc2..94c1e25 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: courier_flutter description: Inbox, Push Notifications and Preferences for Flutter -version: 5.0.0 +version: 5.0.1 homepage: https://courier.com environment: