New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] AppIcon Badge #807
Comments
Thanks @VladislavAntonyuk! Promoting to
approved
Technically, we should've opened the Proposal first before voting to approve said Proposal, but we'll let this one slide. Submitting a Proposal doesn't require a vote from the core maintainers. It should start as a Discussion, and then once the Discussion is deemed feature-complete a Proposal can be opened. |
I love this porposal =) |
@KSemenenko we are focusing on bug fixes for the next month or two. however I am going to implement it as a next feature PR. |
* BadgeCounter #807 * Rename to Badge * Update tests * Remove Xamarin.Android.ShortcutBadger dependency * Fix Tizen build * Add default badge provider, add nova * Fix SamsungBadgeProvider * SetProvider * Initialize array only once * `dotnet format` * Update SamsungBadgeProvider.cs * Update BadgeViewModel.cs * Update DefaultBadgeProvider.android.cs * Use `Lazy<T>` to ensure thread safety * GetCount - Uncommented lines in the csproj file to address Android App installation failure. Toggle Home Screen Icon Badge Count - Added column and row spacing to improve layout in the BadgePage.xaml file. SetBadgeProvider method update - Renamed SetProvider method to SetBadgeProvider in the BadgeFactory.android.cs file. GetCount method implementation - Implemented GetCount method in the BadgeImplementation.android.cs, DefaultBadgeProvider.android.cs, BadgeImplementation.macios.cs, and BadgeImplementation.tizen.cs files. Added GetCount method to IBadge interface - Added GetCount method to the IBadge.shared.cs file. * feat: Add support for Samsung badge provider This commit adds support for the Samsung badge provider in the Android platform. It includes changes to the `SamsungBadgeProvider` class and the `DefaultBadgeProvider.android.cs` file. - Added a new static readonly string array `packageNameArray` in the `SamsungBadgeProvider` class. - Modified the `SetCount` method in the `SamsungBadgeProvider` class to use `packageNameArray` instead of directly passing a string array. - Added a new method `GetCount()` in the `SamsungBadgeProvider` class. - Renamed the method `IsSupported()` to `CanSetBadgeCounter()` in the `DefaultBadgeProvider.android.cs` file. - Added debug log statements for error handling scenarios in both classes. * Fix SamsungBadgeProvider.cs and BadgeTests.cs - Fix a typo in SamsungBadgeProvider.cs by changing "new[1]" to "new string[1]" - Add a new test method GetBadgeFailsOnNet() in BadgeTests.cs that tests the behavior of getting badge count on .NET platform - Modify the existing test method SetBadgeFailsOnNet() in BadgeTests.cs to throw NotSupportedException instead of NotImplementedException - Add a new method GetCount() in BadgeImplementationMock.cs that throws NotImplementedException * Fix build error Sorry Vlad - this was my fault! * Update CommunityToolkit.Maui.Sample.csproj * Update DefaultBadgeProvider.android.cs * Update BadgeImplementation.macios.cs * Update EssentialsGalleryViewModel.cs * Update BaseGalleryViewModel.cs * Update MainApplication.cs * Add null check * Remove `count` field * Update DefaultBadgeProvider.android.cs * Add additional text explaining Bade * Remove GetCount, use uint instead of int * fix tizen build * Update src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.windows.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Update src/CommunityToolkit.Maui.Core/Essentials/Badge/BadgeImplementation.tizen.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Update src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/BadgeFactory.android.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Update src/CommunityToolkit.Maui.Core/Essentials/Badge/Android/DefaultBadgeProvider.android.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> --------- Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Reopening Proposal. Only Proposals moved to the |
Feature name
AppIconBadge
Link to discussion
#734
Progress tracker
Summary
Notify the user about some action in the application.
Step by step with output screenshots at https://vladislavantonyuk.azurewebsites.net/articles/AppIcon-Badge-with-.NET-MAUI
Motivation
Better user experience and app interaction with OS.
https://developer.apple.com/documentation/uikit/uiapplication/1622918-applicationiconbadgenumber
https://github.com/leolin310148/ShortcutBadger
Detailed Design
Usage Syntax
Drawbacks
Android implementation requires the support of many launchers. As part of this feature, I suggest creating a base class and implementation for some main providers, because we can't support all launchers
Alternatives
No response
Unresolved Questions
No response
The text was updated successfully, but these errors were encountered: