ApplicationIcon Badge Number
You may use BadgeNumber property if you want to set the badge counter for your app similar to the image below:
When the number in this property is 0, the system does not display a badge. When the number is greater than 0, the system displays the badge with the specified number.
See the example below:
using SA.CrossPlatform.Notifications;
...
var client = UM_NotificationCenter.Client;
var content = new UM_Notification();
content.SetTitle("Title");
content.SetBody("Body message");
content.SetSmallIconName("myIcon.png");
content.SetSoundName("mySound.wav");
content.SetBadgeNumber(2);
On Andoird If you want more advanced control for the notification badges, consider using Android API directly:
https://github.com/StansAssets/com.stansassets.android-native/wiki/ApplicationIcon-Badge-Number
On iOS you may also control application badges number directly:
https://github.com/StansAssets/com.stansassets.ios-native/wiki/ApplicationIcon-Badge-Number
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Application
- Dark Mode
- Native Dialogs
- Native Preloader
- Date Picker Dialog
- Time Picker Dialog
- Rate Us Dialog
- Build Info
- Locale
- Permissions
- Wheel Picker Dialog
- Getting Started
- Connecting to The Service
- Purchase flow
- Transactions Validation
- Test Inside the Editor
- Advanced use cases
- Getting Started
- Enabling the Ads Service
- Banner Ads
- Non-rewarded Ads
- Rewarded Ads
- Unity Ads
- Google AdMob
- Chartboost
- Getting Started
- Analytics API
- Automatic Tracking
- Unity Analytics
- Firebase Analytics
- Facebook Analytics