badge

Designing a pluggable points and badges system [closed]

我的梦境 提交于 2019-11-30 10:07:00
How do I design a pluggable points and badges system which is easy to turn on and off, as well as easy to turn into a module of its own? After many trials and errors I reached the conclusion that points and badges are simply too intertwined into the sole business logic of the application that they cannot be externalized in a simple way (many rules involve understanding of the core structure of the application, which makes things already quite coupled) I currently do everything the simple way - I externalized all the business logic (validation, persistence, gamification, notifications) in the

Set the application badge number in ios 9

隐身守侯 提交于 2019-11-29 17:08:03
问题 I'd used [UIApplication sharedApplication].applicationIconBadgeNumber = 5; for setting application badge number. It's not working in ios 9 alone. Can anyone suggest why? I tried, [[UIApplication sharedApplication] setApplicationIconBadgeNumber:5]; 回答1: Hi You need to register UIUserNotificationSettings like this UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound

Badge Count is not increasing for push notification.always badge count remains 1?

橙三吉。 提交于 2019-11-29 13:05:26
My app badge count in not increasing when app is in background for push notifications.Count increase by 1 only for the first push notification and always remains badge count as 1, if i get more then 1 notification also badge count remaing 1 only. Below is my code - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSString *message = nil; id alert = [userInfo objectForKey:@"aps"]; if ([alert isKindOfClass:[NSString class]]) { message = alert; } else if ([alert isKindOfClass:[NSDictionary class]]) { message = [alert objectForKey:@"alert"]; }

Apple push notification not changing icon badge automatically

半城伤御伤魂 提交于 2019-11-29 12:15:23
问题 I have seen the mail app in my iPhone (4S, iOS 5.1) automatically updates the badge count if new mail arrives, even when app is not running. So it is possible to achieve this behavior in my app also, right? My application successfully registers for push notifications for all 3 types - Badge, Alert and Sound. Phone Settings is set ON for all 3 types of remote notifications for this application. My app receives remote notifications and shows alert, plays sound, but it does not update the badge

Swift - How to change UITabBarItem badge font?

喜你入骨 提交于 2019-11-29 10:43:17
I have a UITabBar . I set a value for tab bar items: tabBarItem3?.badgeValue = String(self.numberOfProducts) Now I want to change its font to a specific font. Then I used this code : tabBarItem3?.setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .normal) It doesn't work. What should I do? Swift 3 UITabBarItem.appearance().setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .normal) UITabBarItem.appearance().setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .selected) UIKit updates the

How to manage notification when users click on badge

被刻印的时光 ゝ 提交于 2019-11-29 04:38:48
I have a question to ask about notifications. After some hours to learn how to implement push notifications on iPhone, it now arrives! How do I manage users that click on badge or click view on alert? What happen when users click there? I tried to send me some notification and the number on the icon of application in springboard increments. In which way clicking there it's possible to show a uiview to manage the notification arrived and show the message read and unread? Is there a tutorial for it? I want to save all the messages inside a uitableview. Shane Powell You want to read Handling

adding notification badge on app icon in android

删除回忆录丶 提交于 2019-11-29 00:27:12
you may think that this is a duplicate question but i want answers to be more specific than any questions that are similar to this. first it says that like facebook having notification badge with samsung device. How does Facebook add badge numbers on app icon in Android? . and it turns out to be the touchwiz launcher which may be the default launcher of samsung devices. when i tried to test my samsung device with nova launcher. it needs to install some third party software or Nova TestlaUnread. Heres the fact. i thought the touchWiz is adding badge for all application, but when i try to test

Update Badge Number when push notification is received when App is not Open

…衆ロ難τιáo~ 提交于 2019-11-28 21:37:46
I have an App in which i am facing the issue that the badge number only gets updated when i open the notification but i need to update the badge number even when app is not open. Can anyone help me with that?? Mike Weller You need to set a value for the badge key in your push notification payload. From your description, it sounds like it is only your application which is updating the badge number, and not the notification itself. See The Notification Payload of the Local and Push Notification Programming Guide for details: Keys and values of the aps dictionary badge (number): The number to

How do I draw a badge on my Dock icon using Cocoa?

本小妞迷上赌 提交于 2019-11-28 17:53:46
How do I add a badge to the Dock icon for my app using Cocoa? Is there any roughly "standardized" way to do this? (I'm referring to the kind of badges that show up in Mail, iChat etc. to indicate the number of unread messages and the like.) Cocoa Touch does provide one such method, but I haven't been able to find any equivalent for a regular Cocoa application. Use [[[NSApplication sharedApplication] dockTile] setBadgeLabel:@"2234"]; This method, and the NSDockTile class, has been available since Leopard. It should be noted that NSDockTile is only available on Leopard. If you need to target

How to add small red dot in UITabBarItem

橙三吉。 提交于 2019-11-28 17:19:51
How to add red dot on the top right side of the UITabBarItem . I have searched a while and some guys said this can be done setting Badge Value of the UITabBarItem .But when I give it a try and set badge value to empty space " ",the red dot is somewhat big.How can I get a proper one?Big thanks. If you want to avoid traversing subviews & potentially dangerous hacks in general, what I've done is set the badge's background colour to clear and used a styled bullet point to appear as a badge: tabBarItem.badgeValue = "●" tabBarItem.badgeColor = .clear tabBarItem.setBadgeTextAttributes(