HIVE SDK for C++

Classes | Typedefs | Enumerations | Functions
Promotion

HIVE Promotion gives users who use the game the ability to effectively expose new news or events in the game. More...

Classes

class  Promotion
 HIVE Promotion provides you with the ability to effectively expose new news or events to the game user. More...
 
class  PromotionViewInfo
 Information of Promotion webview
(Information to customize your promotion Webview UI) More...
 
class  PromotionBadgeInfo
 Badge information to inform users that new promotions are registered. More...
 
class  PromotionBannerInfo
 Banner information for a specific promotion. More...
 
class  AppInvitationData
 ‍** More...
 
class  AppInvitationCampaign
 Campaign information for invite
Campaigns are data that specifies the conditions for rewarding invite. More...
 
class  AppInvitationSenderInfo
 First sender's userInfo who sent UA share invitation. More...
 

Typedefs

typedef std::function< void(ResultAPI const &result, PromotionEventType promotionEventType)> Promotion::onPromotionView
 Promotion View API Result. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< PromotionViewInfo > const &promotionViewInfo)> Promotion::onPromotionViewInfo
 Returns HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< PromotionBadgeInfo > const &badgeInfoList)> Promotion::onPromotionBadgeInfo
 Returns HIVE Promotion badge information. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< PromotionBannerInfo > const &bannerInfoList)> Promotion::onPromotionBannerInfo
 HIVE Promotion banner information. More...
 
typedef std::function< void(ResultAPI const &result, AppInvitationData const &appInvitationData)> Promotion::onAppInvitationData
 Return information about request for user invite (UserAcquisition) More...
 
typedef std::function< void(ResultAPI const &result, EngagementEventType engagementEventType, EngagementEventState engagementEventState, picojson::value const &param)> Promotion::onEngagement
 An event listener for the SDK to engage clients in certain conditions. More...
 
typedef std::function< void(ResultAPI const &result, AppInvitationSenderInfo const &senderInfo)> Promotion::onAppInvitationSenderInfo
 First sender's userInfo who sent UA share invitation. More...
 

Enumerations

enum class  PromotionType { PromotionType::BANNERLegacy = -1 , PromotionType::BANNER , PromotionType::NEWS , PromotionType::NOTICE }
 Types of Promotion view. More...
 
enum class  PromotionCustomType { PromotionCustomType::VIEW , PromotionCustomType::BOARD , PromotionCustomType::SPOT , PromotionCustomType::DIRECT }
 Types of Promotion CustomView. More...
 
enum class  PromotionEventType {
  PromotionEventType::OPEN , PromotionEventType::CLOSE , PromotionEventType::START_PLAYBACK , PromotionEventType::FINISH_PLAYBACK ,
  PromotionEventType::EXIT , GOBACK
}
 Promotion view event types. More...
 
enum class  PromotionBadgeTarget
 Information on which promotional badge is displayed
If NOTICE, it should indicate the badge related to the notice.
 
enum class  OfferwallState { OfferwallState::ENABLED , OfferwallState::DISABLED , OfferwallState::UNKNOWN }
 Information of Offerwall(free charging station) button. More...
 
enum class  EngagementEventType {
  EngagementEventType::EVENT_TYPE , EngagementEventType::PROMOTION_VIEW , OFFERWALL_VIEW , USER_ACQUISITION ,
  EngagementEventType::COUPON , EngagementEventType::AUTH_LOGIN_VIEW , SOCIAL_INQUIRY_VIEW , EngagementEventType::EVENT ,
  EngagementEventType::IAP_UPDATED , EngagementEventType::IAP_PURCHASE , EngagementEventType::IAP_PROMOTE , EngagementEventType::COMPANION ,
  EngagementEventType::SOCIAL_MYINQUIRY_VIEW , EngagementEventType::SOCIAL_PROFILE_VIEW , EngagementEventType::COMMUNITY_VIEW
}
 UserEngagement 기능 타입 More...
 
enum class  EngagementEventState { EngagementEventState::BEGIN , EngagementEventState::FINISH , EngagementEventState::EVENT_START , EngagementEventState::EVENT_END }
 HIVE SDK 가 특정한 조건에서 클라이언트에 개입 (Engagement) 하는 상태 More...
 
enum class  PromotionCampaignType
 Campaign type selected before requesting rolling banner data. More...
 
enum class  PromotionBannerType
 Banner type selected before requesting rolling banner data. More...
 

Functions

static void Promotion::showPromotion (PromotionType promotionType, bool isForced, onPromotionView listener)
 Shows banner such as new event of game or introduce new game. More...
 
static void Promotion::showCustomContents (PromotionCustomType customType, std::string contentsKey, onPromotionView listener)
 Show custom Webview to use external content. More...
 
static void Promotion::showCustomContentsOnGameWindow (PromotionCustomType customType, std::string contentsKey, onPromotionView listener)
 Show custom Webview to use external content. More...
 
static OfferwallState Promotion::getOfferwallState ()
 Returns whether the button is available to invoke an offerwall (free recharging station) within the game. More...
 
static void Promotion::showOfferwall (onPromotionView listener)
 Show Offerwall(Free recharging station) (Android only.)
The Offerwall (free recharge station) is an advertising network between HIVE games, which enables existing HIVE users to use the new HIVE game. More...
 
static void Promotion::showNews (std::string menu, std::vector< int > giftPidList, onPromotionView listener)
 Shows banner such as new event of game or introduce new game. More...
 
static void Promotion::showNativeReview (onPromotionView listener)
 Show review popup
Positive ratings and reviews of game users will affect other users' use of the game. More...
 
static void Promotion::showReview (onPromotionView listener)
 Show review popup
Positive ratings and reviews of game users will affect other users' use of the game. More...
 
static void Promotion::showExit (onPromotionView listener)
 Show exit popup (Android only)
Expose exit popup which include a button called "More games" to lead users to download a new HIVE game. More...
 
static void Promotion::getViewInfo (PromotionCustomType customType, std::string contentsKey, onPromotionViewInfo listener)
 Request HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI
More...
 
static void Promotion::getBadgeInfo (onPromotionBadgeInfo listener)
 Request badge information
The promotional badge is information that highlights the button UI of the game to inform the user that a new promotion has been registered. More...
 
static void Promotion::getBannerInfo (PromotionCampaignType campaignType, PromotionBannerType bannerType, onPromotionBannerInfo listener)
 Request banner information
Request banner information for a specific promotion. More...
 
static void Promotion::getBannerInfoString (std::string campaignString, std::string bannerString, onPromotionBannerInfo listener)
 Request banner information
Request banner information for a specific promotion. More...
 
static void Promotion::getAppInvitationData (onAppInvitationData listener)
 Request user invite information
User acquisition information is provided to attract more users in the game. More...
 
static void Promotion::setAdditionalInfo (std::string additionalInfo)
 You can set a string in JSON format when you want to expose a specific event page in the Promotion View or want to pass additional information to the Promotion Server. More...
 
static ResultAPI Promotion::setEngagementReady (bool isReady)
 It sets whether Engagement event handling is enabled. More...
 
static bool Promotion::processURI (std::string URI)
 Parse the URI to make it an Event type. More...
 
static void Promotion::setEngagementHandler (onEngagement engagementHandler)
 It register the Engagement listener. More...
 
static void Promotion::showUAShare (std::string inviteMessage, std::string inviteLink, onPromotionUAShare uaShareHandler)
 Show dialog to share UA url via SNS. More...
 
static void Promotion::getAppInvitationSenderInfo (onAppInvitationSenderInfo appInvitationSenderInfoHandler)
 return first sender's userInfo who sent UA share invitation First sender's information can be returned after SDK initialize, login and setEngagementReady(true) More...
 

Detailed Description

HIVE Promotion gives users who use the game the ability to effectively expose new news or events in the game.


Promotion view (notice, event), reward (coupon, deep link), exit popup (Android), free charging station(Offerwall)

Typedef Documentation

◆ onAppInvitationData

typedef std::function<void(ResultAPI const & result, AppInvitationData const & appInvitationData)> Promotion::onAppInvitationData

Return information about request for user invite (UserAcquisition)

Parameters
resultAPI call result
appInvitationDataUser invite information.

◆ onAppInvitationSenderInfo

typedef std::function<void(ResultAPI const & result, AppInvitationSenderInfo const & senderInfo)> Promotion::onAppInvitationSenderInfo

First sender's userInfo who sent UA share invitation.

Parameters
resultResult of API call
senderInfoFirst sender's userInfo

◆ onEngagement

typedef std::function<void(ResultAPI const & result, EngagementEventType engagementEventType, EngagementEventState engagementEventState, picojson::value const & param)> Promotion::onEngagement

An event listener for the SDK to engage clients in certain conditions.


The specific conditions are, for example, a mobile message (SMS), a URL click on a message in a push notification, or a user action in a promotional view.

Parameters
resultResult of API call
engagementEventTypeEvent type
engagementEventStateEvent status
paramEvent information

◆ onPromotionBadgeInfo

typedef std::function<void(ResultAPI const & result, std::vector<PromotionBadgeInfo> const & badgeInfoList)> Promotion::onPromotionBadgeInfo

Returns HIVE Promotion badge information.

Parameters
resultAPI call result
badgeInfoListHIVE Promotion badge information

◆ onPromotionBannerInfo

typedef std::function<void(ResultAPI const & result, std::vector<PromotionBannerInfo> const & bannerInfoList)> Promotion::onPromotionBannerInfo

HIVE Promotion banner information.

Parameters
resultAPI call result
bannerInfoListHIVE Promotion banner information

◆ onPromotionView

typedef std::function<void(ResultAPI const & result, PromotionEventType promotionEventType)> Promotion::onPromotionView

Promotion View API Result.

Parameters
resultAPI call result
promotionEventTypePromotion event type

◆ onPromotionViewInfo

typedef std::function<void(ResultAPI const & result, std::vector<PromotionViewInfo> const & promotionViewInfo)> Promotion::onPromotionViewInfo

Returns HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI.

Parameters
resultAPI call result
promotionViewInfoHIVE Promotion Webview information

Enumeration Type Documentation

◆ EngagementEventState

enum class EngagementEventState
strong

HIVE SDK 가 특정한 조건에서 클라이언트에 개입 (Engagement) 하는 상태

Enumerator
BEGIN 

Engagement에 의해 최초 기능이 수행되기 시작함을 알림.

FINISH 

Engagement에 의한 모든 기능 수행이 종료됨을 알림.

EVENT_START 

Engagement에 의해 특정 기능이 수행되기 시작함을 알림.

EVENT_END 

Engagement에 의한 특정 기능 수행이 종료됨을 알림.

◆ EngagementEventType

enum class EngagementEventType
strong

UserEngagement 기능 타입

Enumerator
EVENT_TYPE 

< kHIVEEngagementEventType Engagement의 전체 시작과 끝을 알리는 경우. (이름 변경 예정)

PROMOTION_VIEW 

kHIVEEngagementEventTypePromotionView Engagement에 의해 처리되는 PromotionView인 경우. EventState가 kHIVEEngagementStateEventEnd인 경우 PromotionView의 결과가 ResultAPI와 Param으로 전달된다.

COUPON 

kHIVEEngagementEventTypeCoupon Engagement에 의해 처리된 쿠폰 소모에 대한 결과. EventState가 kHIVEEngagementStateEventEnd인 경우 쿠폰사용의 결과가 ResultAPI와 Param으로 전달된다.

AUTH_LOGIN_VIEW 

kHIVEEngagementEventTypeAuthLogin 유저(클라이언트)에 의해 열리지 않은 로그인 프로세스에 의한 결과를 받는 콜백.

EVENT 

kHIVEEngagementEventTypeEvent Engagement에 의해 처리될 수 없는 이벤트(host가 game인 경우)를 전달해주는 콜백.

IAP_UPDATED 

Deprecated in HIVE SDK 4.5.0.

IAP_PURCHASE 

kHIVEEngagementEventTypeIapPurchase 앱이 시작 혹은 실행 중일 때, 앱 외에서 상품을 구매시도시 불리게 되는 콜백.
해당 콜백이 불리면 구매 팝업이 노출되며 Engagement ready 상태가 false로 변경된다.

IAP_PROMOTE 

kHIVEEngagementEventTypeIapPromote 앱이 시작 혹은 실행 중일 때, 앱 외에서 상품을 구매시도시 불리게 되는 콜백.
해당 콜백이 불리면 게임에서는 아이템 구매가 가능한 적정한 시점에 checkPromotePurchase: 를 호출하여야 한다.

COMPANION 

Promotion CPA Link recevied. SDK Will be send promotion companion.

SOCIAL_MYINQUIRY_VIEW 

내 문의 내역을 오픈

SOCIAL_PROFILE_VIEW 

프로필 페이지 오픈

COMMUNITY_VIEW 

커뮤니티 페이지를 오픈. Open the community page.

◆ OfferwallState

enum class OfferwallState
strong

Information of Offerwall(free charging station) button.

Enumerator
ENABLED 

Offerwall Button can be exposed.

DISABLED 

Offerwall Button cannot be exposed.

UNKNOWN 

Unknown status whether available to expose buttons or not.

◆ PromotionBannerType

enum class PromotionBannerType
strong

Banner type selected before requesting rolling banner data.

Author
Seokjin Yong

◆ PromotionCampaignType

enum class PromotionCampaignType
strong

Campaign type selected before requesting rolling banner data.

Author
Seokjin Yong

◆ PromotionCustomType

enum class PromotionCustomType
strong

Types of Promotion CustomView.

Author
kjkim
Enumerator
VIEW 

Custom view.

BOARD 

Custom board.

SPOT 

Spot banner.

DIRECT 

Direct campaign.

◆ PromotionEventType

enum class PromotionEventType
strong

Promotion view event types.

Author
ryuvsken
Enumerator
OPEN 

When the Promotion View window opens.

CLOSE 

When the Promotion View window is closed.

START_PLAYBACK 

When Playback starts.

FINISH_PLAYBACK 

When Playback is finished.

EXIT 

When you choose to quit from the Quit (see more games) popup.

◆ PromotionType

enum class PromotionType
strong

Types of Promotion view.

Author
ryuvsken
Enumerator
BANNERLegacy 

Full Banner.

BANNER 

Full banner.

NEWS 

News.

NOTICE 

Notice.

Function Documentation

◆ getAppInvitationData()

static void Promotion::getAppInvitationData ( onAppInvitationData  listener)
static

Request user invite information
User acquisition information is provided to attract more users in the game.


Data for user acquisition include QR Code, invite links, and campaigns.
A campaign is data that specifies the conditions for rewarding an invite.
The invite URL or QR code provides rewards to both the invited and invited users when the invited user achieves the conditions such as installing the game and achieving a certain level (condition and reward can be set in the back office).

Parameters
listenerAPI call result.

◆ getAppInvitationSenderInfo()

static void Promotion::getAppInvitationSenderInfo ( onAppInvitationSenderInfo  appInvitationSenderInfoHandler)
static

return first sender's userInfo who sent UA share invitation First sender's information can be returned after SDK initialize, login and setEngagementReady(true)

Parameters
AppInvitationSenderInfoHandlerAPI call result listener

◆ getBadgeInfo()

static void Promotion::getBadgeInfo ( onPromotionBadgeInfo  listener)
static

Request badge information
The promotional badge is information that highlights the button UI of the game to inform the user that a new promotion has been registered.

Parameters
listenerAPI call result listener

◆ getBannerInfo()

static void Promotion::getBannerInfo ( PromotionCampaignType  campaignType,
PromotionBannerType  bannerType,
onPromotionBannerInfo  listener 
)
static

Request banner information
Request banner information for a specific promotion.

Used to retrieve banner information from the game server.

Parameters
campaignType"event", "notice", "all", "cross"
handlerAPI call result listener

◆ getBannerInfoString()

static void Promotion::getBannerInfoString ( std::string  campaignString,
std::string  bannerString,
onPromotionBannerInfo  listener 
)
static

Request banner information
Request banner information for a specific promotion.

Used to retrieve banner information from the game server.

Parameters
campaignTypecustom String campaign type
handlerAPI call result listener

◆ getOfferwallState()

static OfferwallState Promotion::getOfferwallState ( )
static

Returns whether the button is available to invoke an offerwall (free recharging station) within the game.


The button UI for exposing free recharge stations within the game must be configured to be visible or hidden.

Returns
whether the button is available.

◆ getViewInfo()

static void Promotion::getViewInfo ( PromotionCustomType  customType,
std::string  contentsKey,
onPromotionViewInfo  listener 
)
static

Request HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI

Parameters
listenerAPI call result listener

◆ processURI()

static bool Promotion::processURI ( std::string  URI)
static

Parse the URI to make it an Event type.

Parameters
URIURI to parse
Returns
True if there is no problem parsing, false otherwise.

◆ setAdditionalInfo()

static void Promotion::setAdditionalInfo ( std::string  additionalInfo)
static

You can set a string in JSON format when you want to expose a specific event page in the Promotion View or want to pass additional information to the Promotion Server.


(Required) Even a single server group without a server group should be properly put in the following example
ex)"addtionalInfo":"{"server":"0","character":"0"}"

Parameters
additionalInfo(Required) Additional information data in JSON format

◆ setEngagementHandler()

static void Promotion::setEngagementHandler ( onEngagement  engagementHandler)
static

It register the Engagement listener.

Parameters
engagementHandler

◆ setEngagementReady()

static ResultAPI Promotion::setEngagementReady ( bool  isReady)
static

It sets whether Engagement event handling is enabled.

(Such as when a DB is created in the game server) If you want to set it to true, it must be in a state that satisfies the condition of <after login & after registering the listener>, if you want to set it to false, you can always set it.

Parameters
isReadyWhether Engagement events can be processed.
Returns
Whether the API call was successful.

◆ showCustomContents()

static void Promotion::showCustomContents ( PromotionCustomType  customType,
std::string  contentsKey,
onPromotionView  listener 
)
static

Show custom Webview to use external content.

Parameters
promotionCustomTypePromotionCustomType Type
contentsKeyID of the custom web page set in the back office.
listenerAPI call result listener

◆ showCustomContentsOnGameWindow()

static void Promotion::showCustomContentsOnGameWindow ( PromotionCustomType  customType,
std::string  contentsKey,
onPromotionView  listener 
)
static

Show custom Webview to use external content.

Parameters
promotionCustomTypePromotionCustomType Type
contentsKeyID of the custom web page set in the back office.
listenerAPI call result listener

◆ showExit()

static void Promotion::showExit ( onPromotionView  listener)
static

Show exit popup (Android only)
Expose exit popup which include a button called "More games" to lead users to download a new HIVE game.

Parameters
listenerAPI call result listener

◆ showNativeReview()

static void Promotion::showNativeReview ( onPromotionView  listener)
static

Show review popup
Positive ratings and reviews of game users will affect other users' use of the game.


It is known that the number of user participation increases by 5 ~ 10 times when the review
Review popup on the device with iOS 10.3 and later is available to rate and write reviews in apps.

Since
4.10.0

◆ showNews()

static void Promotion::showNews ( std::string  menu,
std::vector< int >  giftPidList,
onPromotionView  listener 
)
static

Shows banner such as new event of game or introduce new game.

Parameters
menuMenu Management Name
handlerAPI call result handler

◆ showOfferwall()

static void Promotion::showOfferwall ( onPromotionView  listener)
static

Show Offerwall(Free recharging station) (Android only.)
The Offerwall (free recharge station) is an advertising network between HIVE games, which enables existing HIVE users to use the new HIVE game.


A list of the games that the user can download is exposed, and the game is downloaded and executed, and reward is provided in the game as the medium.

Parameters
listenerAPI call result listener

◆ showPromotion()

static void Promotion::showPromotion ( PromotionType  promotionType,
bool  isForced,
onPromotionView  listener 
)
static

Shows banner such as new event of game or introduce new game.

Parameters
promotionTypePromotion View type
isForcedIf ture, it only works when promotionType is "notice" and "event"
                        and it ignore 'Not seeing it again for 24 hours'.
                        (Note: Since 'Not seeing it again for 24 hours' does not apply, you should only use certain actions, such as viewing as a button action.)

                        If false or omitted, 'Not seeing it again for 24 hours' will operate normally.
listenerAPI call result listener

◆ showReview()

static void Promotion::showReview ( onPromotionView  listener)
static

Show review popup
Positive ratings and reviews of game users will affect other users' use of the game.


It is known that the number of user participation increases by 5 ~ 10 times when the review
Depending on the settings of Hive console, Hive normal review popup or customized image review popup will be appeard.

◆ showUAShare()

static void Promotion::showUAShare ( std::string  inviteMessage,
std::string  inviteLink,
onPromotionUAShare  uaShareHandler 
)
static

Show dialog to share UA url via SNS.

Parameters
inviteMessageUA invite message
inviteLinkUA invite link
uaShareHandlerAPI call result listener
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy