Promotion Badge is an indicator added to in-game buttons or icons to notify that new promotion is registered.

What Does Promotion Badge Do?

Promotion badge is a function that informs users when a new promotion is registered and exposed, by delivering that information to the game client. It can be applied to the Hive promotion features like the full banner, custom view, custom board and notice icon.

Implementing Promotion Badge UI

The Hive SDK sends “badge ON” if a promotion item is new and “badge OFF” if it is not new to the game client. The exposure of badge must be implemented on the game side using this ON/OFF information.
 

Example screen of promotion badge

 

Badge Data Format

Hive returns PromotionBadgeInfo object holding only the information of promotion view as an array.  If there is no target promotion view for which the badge should be displayed, an empty array is returned. The following table describes the composition of PromotionBadgeInfo object which Hive returns.

Field Type Description
target Enumerator Target promotion view to display a badge

  • PromotionBadgeTarget.NEWS: News page
  • PromotionBadgeTarget.NOTICE: Notice list
  • PromotionBadgeTarget.CUSTOMVIEW: Custom view
  • PromotionBadgeTarget.CUSTOMBOARD: Custom board
contentsKey String Identifier registered in the Hive console when the promotion view of the badge is a custom web view or custom board. If the promotion view is a news or notice list, null is returned
badgeType String Badge type to display

  • "new": Default value. Available to expose the badge in the form implemented in the game side.

Search Badge Data

To search badge data, call getBadgeInfo() method of Promotion class. You can receive the data through callback function transmitted as a function parameter.
Followings are sample codes to search badge data.

Unity®

API Reference: hive.Promotion.getBadgeInfo

C++

API Reference: Promotion::getBadgeInfo

Kotlin

API Reference: Promotion.getBadgeInfo

Java

API Reference: Promotion.INSTANCE.getBadgeInfo

Swift

API Reference: PromotionInterface.getBadgeInfo

Objective-C

API Reference: HIVEPromotion:getBadgeInfo