badge

How to detect when user clears your app's notification

最后都变了- 提交于 2019-12-02 10:21:57
问题 My app has notification feature. When I receive a notification I show a badge in my app icon. As I know, when my app is on background, since user does not clicks on the notification at notification center, my app does not know that it has a notification. So it can not change the badge number. Also from this topic: Detect when a user clears notification from the notification center If user clears the app's notification, the app can not detect it. So the problem is here: - My app is on

Customizing the product sale flash badge

送分小仙女□ 提交于 2019-12-02 06:36:00
问题 I am trying to add save amount total on the sale flash badge using this snippet here below but there is something wrong since it is not working. Any advice would be really appreciated. // Add save amount on the sale badge. add_filter( 'woocommerce_sale_flash', 'woocommerce_custom_badge', 10, 2 ); function woocommerce_custom_badge( $price, $product ) { $saved = wc_price( $product->regular_price - $product->sale_price ); return $price . sprintf( __(' <div class="savings">Save %s</div>',

How to detect when user clears your app's notification

时光毁灭记忆、已成空白 提交于 2019-12-02 05:41:31
My app has notification feature. When I receive a notification I show a badge in my app icon. As I know, when my app is on background, since user does not clicks on the notification at notification center, my app does not know that it has a notification. So it can not change the badge number. Also from this topic: Detect when a user clears notification from the notification center If user clears the app's notification, the app can not detect it. So the problem is here: - My app is on background - User receives a notification related to the app - App adds a badge with number 1 to the app's icon

How to change UITabBarItem Badge position?

霸气de小男生 提交于 2019-12-01 21:27:26
This is how my Tabbar is looking right now. How do I move that badge so that it overlaps the top right of the bell icon? Any help is appreciated. try this: func repositionBadge(tabIndex: Int){ for badgeView in self.tabBarController!.tabBar.subviews[tabIndex].subviews { if NSStringFromClass(badgeView.classForCoder) == "_UIBadgeView" { badgeView.layer.transform = CATransform3DIdentity badgeView.layer.transform = CATransform3DMakeTranslation(-17.0, 1.0, 1.0) } } } pay attention, tabIndex starts from 1 Based on Marco Santarossa's answer , I updated it by making it into a UITabBarController

Clear applicationIconBadgeNumber without removing notifications not working

纵然是瞬间 提交于 2019-12-01 16:08:49
问题 I've read in a few posts (like this one https://forums.developer.apple.com/thread/7598) that setting application.applicationIconBadgeNumber = -1 on applicationDidBecomeActive or applicationWillEnterForeground would allow me to clear the badge number without removing the notifications from the notification center. When I set application.applicationIconBadgeNumber to a negative number (like -1) it clears all my notifications from the Notification Center . Is there another way to clear the badge

Can the merit gem recalculate reputation and re-evaluate badges and ranks?

爷,独闯天下 提交于 2019-12-01 06:42:29
I would like to add a system of points, ranks and badges in my rails app. The merit gem looks cool, but I want to make sure how it works before using it. The way you define badges # app/models/merit/badge_rules.rb grant_on 'comments#vote', :badge => 'relevant-commenter', :to => :user do |comment| comment.votes.count == 5 end and points # app/models/merit/point_rules.rb score 10, :to => :post_creator, :on => 'comments#create' do |comment| comment.title.present? end suggest that the action is done as a hook, just after the action ( comments#vote or comments#create ) in those cases. I havn't

ionic set badge after push notification

对着背影说爱祢 提交于 2019-11-30 23:12:17
I'm using IONIC Framework and I'd like to set the badge of my application after I'm getting push notification. Is there a way to do it when my application is closed? it is for others who will run into the same problem. I believe your talking about making badge visible with the updated badge number you've received from server. First thing to enable it in code in init method of Push like this var push = PushNotification.init({ android: { senderID: senderID, icon: 'pushicon', sound: "true", iconColor: "#ED8B00" }, browser: { pushServiceURL: 'url' }, ios: { alert: "true", **badge: "true",** sound:

ionic set badge after push notification

余生颓废 提交于 2019-11-30 17:34:03
问题 I'm using IONIC Framework and I'd like to set the badge of my application after I'm getting push notification. Is there a way to do it when my application is closed? 回答1: it is for others who will run into the same problem. I believe your talking about making badge visible with the updated badge number you've received from server. First thing to enable it in code in init method of Push like this var push = PushNotification.init({ android: { senderID: senderID, icon: 'pushicon', sound: "true",

Designing a pluggable points and badges system [closed]

我的未来我决定 提交于 2019-11-30 14:20:30
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . 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

Set the application badge number in ios 9

久未见 提交于 2019-11-30 11:08:11
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]; Hi You need to register UIUserNotificationSettings like this UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];