Best way to store Badge criteria?

Rules. You create events in the system, and use rules within an event stream processor. Specifically, say you have a badge “made 10 posts”. You don’t run “select count(*) from posts where user = :user” for every post. Rather, you have a simple rule that watches each post come by, and “count them”, storing the … Read more

How to interface with the BadgeProvider on Samsung phones to add a count to the app icon?

First you’ll need to add the following permissions to your AndroidManifest.xml file. <uses-permission android:name=”com.sec.android.provider.badge.permission.READ” /> <uses-permission android:name=”com.sec.android.provider.badge.permission.WRITE” /> The column structure is as follows: (integer) _id, (text) package, (text) class, (integer) badgecount, (blob) icon, (???) extraData In order to query ALL results from the BadgeProvider do the following: // This is the content uri for … Read more

Add badge to app icon in iOS 8 with Swift

The “number on top of the icon” is called a Badge. Badges can be set on a number of things besides Application Icons including Navigation Bar toolbar icons. There are many ways to change the Application Icon Badge. Most use cases involve setting this when the Application is in the background to alert the user … Read more

How to implement badges?

A similar-to-Stackoverflow implementation is actually a lot simpler than you have described, based on bits of info dropped by the team every once in awhile. In the database, you simply store a collection of BadgeID–UserID pairs to track who has what (and a count or a rowID to allow multiple awards for some badges). In … Read more

Attempting to badge the application icon but haven’t received permission from the user to badge the application : iOS 8 Xcode 6

Here is What I did in my AppDelegate – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // registering for remote notifications [self registerForRemoteNotification]; return YES; } – (void)registerForRemoteNotification { if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@”8.0″)) { UIUserNotificationType types = UIUserNotificationTypeSound | UIUserNotificationTypeBadge | UIUserNotificationTypeAlert; UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:types categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings]; } else { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound … Read more

Database Architecture for “Badge” System & Arbitrary Criteria (MySQL/PHP)

Given that the badge criteria can be arbitrarily complex, I don’t think you can store it in a database table broken down into “simple” data elements. Trying to write a “rules engine” that can handle arbitrarily complex criteria is going to take you down the path of basically re-writing all the tools that you have … Read more