-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
☂️ Support app badges on more platforms #2480
Comments
Could you maybe give a small example on how you implemented the badge numbers on Android & iOS? |
Sure (note, I didn't write the Android and iOS implementations): Android
Lines 417 to 419 in 4ef55a2
iOS/MacOS
Lines 620 to 622 in 4ef55a2
|
Although a typical use case is to have it tied to notifications, note that what is mentioned in the docs was specifically referring to app badging that can also be done without notifications. This is why I mentioned "directly" On Android, this refers to how there's no official Android API for this at an app level. If you looked into the discontinued plugin, it makes use of a popular library in the Android ecosystem where there are various launchers that allow seeing and setting the badge count. This looks different to what can be seen on stock Android where there isn't a number in the corner of the app icon. I use to have a Sony phone where I noticed badge numbers but this was prior to working on this plugin. I don't know if it'll respect what's passed through the notification. Might need to get help from others and also check other phones that I can borrow to confirm. On iOS/macOS, this was referring to https://developer.apple.com/documentation/uikit/uiapplication/applicationiconbadgenumber. It wasn't deprecated at the time and looks like it's only been recently been considered as deprecated with the docs mentioning to use this instead |
...Interesting. I didn't even think to go the Linux way of "better support every combo that exists" and thought the base Android sdk would be enough. I think it's reasonable that badges without a notification aren't implemented yet, and if we do find a replacement, we can always add it to the Android plugin. Still, probably worth clarifying the distinction in the docs. I have a PR for that but so far I've only done the native setup docs, not the list of features the plugin supports |
The text was updated successfully, but these errors were encountered: