diff --git a/Plugin.FirebasePushNotifications.sln b/Plugin.FirebasePushNotifications.sln index 2df1b09..daa184b 100644 --- a/Plugin.FirebasePushNotifications.sln +++ b/Plugin.FirebasePushNotifications.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution azure-pipelines.yml = azure-pipelines.yml LICENSE = LICENSE README.md = README.md + ReleaseNotes.txt = ReleaseNotes.txt EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin.FirebasePushNotifications", "Plugin.FirebasePushNotifications\Plugin.FirebasePushNotifications.csproj", "{49F1F62D-5A20-49A6-B508-408BE32B0DC6}" diff --git a/Plugin.FirebasePushNotifications/Platforms/Android/FirebasePushNotificationManager.cs b/Plugin.FirebasePushNotifications/Platforms/Android/FirebasePushNotificationManager.cs index 4fb6acb..c8f2c97 100644 --- a/Plugin.FirebasePushNotifications/Platforms/Android/FirebasePushNotificationManager.cs +++ b/Plugin.FirebasePushNotifications/Platforms/Android/FirebasePushNotificationManager.cs @@ -187,7 +187,7 @@ public void ProcessIntent(Activity activity, Intent intent) if (!intent.GetBooleanExtra(intentAlreadyHandledKey, false)) { intent.PutExtra(intentAlreadyHandledKey, true); - this.logger.LogDebug($"ProcessIntent: {intentAlreadyHandledKey} not present --> Process notification"); + this.logger.LogDebug($"ProcessIntent: {intentAlreadyHandledKey} not present → Process notification"); if (extras.TryGetInt(Constants.ActionNotificationIdKey, out var notificationId)) { @@ -216,7 +216,7 @@ public void ProcessIntent(Activity activity, Intent intent) } else { - this.logger.LogDebug($"ProcessIntent: {intentAlreadyHandledKey} is present --> Notification already processed"); + this.logger.LogDebug($"ProcessIntent: {intentAlreadyHandledKey} is present → Notification already processed"); } } } diff --git a/Plugin.FirebasePushNotifications/Platforms/Android/ILLink.Descriptors.xml b/Plugin.FirebasePushNotifications/Platforms/Android/ILLink.Descriptors.xml new file mode 100644 index 0000000..5a86e3d --- /dev/null +++ b/Plugin.FirebasePushNotifications/Platforms/Android/ILLink.Descriptors.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Plugin.FirebasePushNotifications/Platforms/Android/proguard.cfg b/Plugin.FirebasePushNotifications/Platforms/Android/proguard.cfg new file mode 100644 index 0000000..04a0f10 --- /dev/null +++ b/Plugin.FirebasePushNotifications/Platforms/Android/proguard.cfg @@ -0,0 +1,6 @@ +-dontwarn com.google.android.gms.** +-keep class com.google.android.gms.** { *; } +-keep class com.google.firebase.** { *; } +-keep class androidx.startup.AppInitializer +-keep class androidx.startup.InitializationProvider +-keep class androidx.startup.Initializer \ No newline at end of file diff --git a/Plugin.FirebasePushNotifications/Plugin.FirebasePushNotifications.csproj b/Plugin.FirebasePushNotifications/Plugin.FirebasePushNotifications.csproj index 95f354e..2761199 100644 --- a/Plugin.FirebasePushNotifications/Plugin.FirebasePushNotifications.csproj +++ b/Plugin.FirebasePushNotifications/Plugin.FirebasePushNotifications.csproj @@ -1,18 +1,18 @@  - net7.0;net7.0-android33.0;net7.0-ios;net8.0;net8.0-android34.0;net8.0-ios17.0 + net8.0;net8.0-android34.0;net8.0-ios17.0;net9.0;net9.0-android35.0;net9.0-ios18.0 Library true 8.0.3 - 7.0.49 + 9.0.0 true enable disable true - True - 12.0 + 12.0 + 12.2 24.0 true @@ -32,60 +32,18 @@ firebase;push;notification;notifications logo.png LICENSE + README.md https://github.com/thomasgalliker/Plugin.FirebasePushNotifications git https://github.com/thomasgalliker/Plugin.FirebasePushNotifications superdev GmbH false - 4.0 -- Improved notification channel handling during app startup. -- Data-only notifications are no longer displayed in the notification tray. -- NotificationBuilder support for Android API 26 and below (where no notification channels are available). -- OpenNotificationSettings now also works for Android API 26 and below. -- Synchronized notification handling behavior between Android and iOS. -- Renamed topic methods to follow the Async pattern: SubscribeToTopicAsync, UnsubscribeFromTopicAsync, etc. -- Use AddOnCompleteListener for asynchronous tasks in Android. -- Bug fixes and refactorings. - -3.2 -- Improved default notification channel handling. -- Bug fixes and refactorings. - -3.1 -- Extend INotificationChannels to manage notification channel groups. -- Internal refactoring of INotificationChannels implementation. -- Removed properties IsActive and IsDefault from NotificationChannelRequest. Set the default notification channel via UseFirebasePushNotifications(o => o.Android.DefaultNotificationChannelId = ...). -- Configure initial list of notification channels via o.Android.NotificationChannels and notification groups via o.Android.NotificationChannelGroups. - -3.0 -- Update firebase-ios-sdk by replacing nuget package Xamarin.Firebase.iOS.CloudMessaging with AdamE.Firebase.iOS.CloudMessaging. - -2.5 -- Move static properties from Android's FirebasePushNotificationManager to FirebasePushNotificationAndroidOptions. -- iOS 18 workaround for duplicate notifications in foreground mode. -- iOS options to override default UNNotificationPresentationOptions for notifications received in foreground mode. -- Handle gcm.notification.click_action payload as click_action in Android. - -2.4 -- Refactor instanciation of IFirebasePushNotification. -- Refactor startup procedure of platform-specific services. -- Add singleton instance INotificationPermissions.Current. - -2.3 -- General bug fixes and code cleanup. -- Bug fixes in the area of topic subscriptions. -- IFirebasePushNotification.Current. -- Add singleton instance IFirebasePushNotification.Current and INotificationPermissions.Current. - -2.2 -- Complete refactoring of the original 1.x implementation. -- Simplified APIs, less static code, support for dependency injection. - -1.0 -- Initial release. - - Copyright $([System.DateTime]::Now.ToString(`yyyy`)) © Thomas Galliker - README.md + Copyright $([System.DateTime]::Now.ToString(`yyyy`)) © Thomas Galliker + $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../ReleaseNotes.txt")) + true + snupkg + true + true @@ -94,30 +52,37 @@ - + + true + + + - - - - - + + + + + - - - - - - - + - + + + + + + + + + + diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..5e66fb4 --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,48 @@ +4.0 +- Improved notification channel handling during app startup. +- Data-only notifications are no longer displayed in the notification tray. +- NotificationBuilder support for Android API 26 and below (where no notification channels are available). +- OpenNotificationSettings now also works for Android API 26 and below. +- Synchronized notification handling behavior between Android and iOS. +- Renamed topic methods to follow the Async pattern: SubscribeToTopicAsync, UnsubscribeFromTopicAsync, etc. +- Use AddOnCompleteListener for asynchronous tasks in Android. +- Add target framework net9.0, net9.0-android and net9.0-ios. +- Remove target framework net7.0, net7.0-android and net7.0-ios. +- Bug fixes and refactorings. + +3.2 +- Improved default notification channel handling. +- Bug fixes and refactorings. + +3.1 +- Extend INotificationChannels to manage notification channel groups. +- Internal refactoring of INotificationChannels implementation. +- Removed properties IsActive and IsDefault from NotificationChannelRequest. Set the default notification channel via UseFirebasePushNotifications(o => o.Android.DefaultNotificationChannelId = ...). +- Configure initial list of notification channels via o.Android.NotificationChannels and notification groups via o.Android.NotificationChannelGroups. + +3.0 +- Update firebase-ios-sdk by replacing nuget package Xamarin.Firebase.iOS.CloudMessaging with AdamE.Firebase.iOS.CloudMessaging. + +2.5 +- Move static properties from Android's FirebasePushNotificationManager to FirebasePushNotificationAndroidOptions. +- iOS 18 workaround for duplicate notifications in foreground mode. +- iOS options to override default UNNotificationPresentationOptions for notifications received in foreground mode. +- Handle gcm.notification.click_action payload as click_action in Android. + +2.4 +- Refactor instanciation of IFirebasePushNotification. +- Refactor startup procedure of platform-specific services. +- Add singleton instance INotificationPermissions.Current. + +2.3 +- General bug fixes and code cleanup. +- Bug fixes in the area of topic subscriptions. +- IFirebasePushNotification.Current. +- Add singleton instance IFirebasePushNotification.Current and INotificationPermissions.Current. + +2.2 +- Complete refactoring of the original 1.x implementation. +- Simplified APIs, less static code, support for dependency injection. + +1.0 +- Initial release. \ No newline at end of file diff --git a/Samples/MauiSampleApp/MauiProgram.cs b/Samples/MauiSampleApp/MauiProgram.cs index 185adc9..289532e 100644 --- a/Samples/MauiSampleApp/MauiProgram.cs +++ b/Samples/MauiSampleApp/MauiProgram.cs @@ -7,6 +7,7 @@ using Plugin.FirebasePushNotifications.Model.Queues; using MauiSampleApp.Services.Logging; using NLog.Extensions.Logging; +using Superdev.Maui; #if ANDROID using Android.App; @@ -66,6 +67,7 @@ public static MauiApp CreateMauiApp() // o.iOS.iOS18Workaround.Enable = true; #endif }) + .UseSuperdevMaui() .ConfigureFonts(fonts => { fonts.AddFont("IBMPlexSans-Regular.ttf", "IBMPlexSans"); diff --git a/Samples/MauiSampleApp/MauiSampleApp.csproj b/Samples/MauiSampleApp/MauiSampleApp.csproj index 4063ce1..63236bc 100644 --- a/Samples/MauiSampleApp/MauiSampleApp.csproj +++ b/Samples/MauiSampleApp/MauiSampleApp.csproj @@ -1,11 +1,11 @@  - net8.0;net8.0-android;net8.0-ios + net9.0-android;net9.0-ios Exe MauiSampleApp true - 8.0.100 + 9.0.90 true enable disable @@ -19,18 +19,13 @@ da8d1bd2-3ced-4171-b0da-3f1a7806e5af - 1.0 + 1.0.0 1 - 12.0 + 12.2 24.0 - - - Library - - None apk false - true + false SdkOnly @@ -134,12 +129,12 @@ - - - - - - + + + + + + diff --git a/Samples/MauiSampleApp/Platforms/Android/AndroidManifest.xml b/Samples/MauiSampleApp/Platforms/Android/AndroidManifest.xml index 9970642..9ce82b1 100644 --- a/Samples/MauiSampleApp/Platforms/Android/AndroidManifest.xml +++ b/Samples/MauiSampleApp/Platforms/Android/AndroidManifest.xml @@ -24,10 +24,6 @@ - - - - diff --git a/Samples/MauiSampleApp/Views/MainPage.xaml b/Samples/MauiSampleApp/Views/MainPage.xaml index cf3f9e1..119d049 100644 --- a/Samples/MauiSampleApp/Views/MainPage.xaml +++ b/Samples/MauiSampleApp/Views/MainPage.xaml @@ -3,9 +3,9 @@ - diff --git a/Tests/Plugin.FirebasePushNotifications.Tests/Plugin.FirebasePushNotifications.Tests.csproj b/Tests/Plugin.FirebasePushNotifications.Tests/Plugin.FirebasePushNotifications.Tests.csproj index 151cd88..451990d 100644 --- a/Tests/Plugin.FirebasePushNotifications.Tests/Plugin.FirebasePushNotifications.Tests.csproj +++ b/Tests/Plugin.FirebasePushNotifications.Tests/Plugin.FirebasePushNotifications.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable disable false @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -17,11 +17,11 @@ - + - - - + + + all runtime; build; native; contentfiles; analyzers diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2c98164..3903ea5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -68,9 +68,9 @@ steps: DisableTelemetry: true - task: UseDotNet@2 - displayName: 'Use .NET 8.x' + displayName: 'Use .NET 9' inputs: - version: 8.x + version: 9.0.x - task: Bash@3 displayName: Install .NET MAUI @@ -97,6 +97,7 @@ steps: inputs: command: restore projects: '$(solution)' + restoreArguments: '/p:Configuration=$(buildConfiguration)' - task: DownloadSecureFile@1 name: GoogleServiceFileAndroid @@ -158,11 +159,10 @@ steps: displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' inputs: SourceFolder: '$(system.defaultworkingdirectory)' - Contents: | - **\bin\$(BuildConfiguration)\** - **\bin\*.nupkg - + **\bin\*.nupkg + **\bin\*.snupkg + **\ReleaseNotes.txt TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishCodeCoverageResults@2