HIVE SDK for Unity3D

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

Enumerations

enum  hive.PromotionType { hive.PromotionType.BANNERLEGACY = -1 , hive.PromotionType.BANNER , hive.PromotionType.NEWS , hive.PromotionType.NOTICE }
 Types of Promotion view. More...
 
enum  hive.PromotionCustomType { hive.PromotionCustomType.VIEW , hive.PromotionCustomType.BOARD , hive.PromotionCustomType.SPOT , hive.PromotionCustomType.DIRECT }
 Types of Promotion CustomView. More...
 
enum  hive.PromotionEventType {
  hive.PromotionEventType.OPEN , hive.PromotionEventType.CLOSE , hive.PromotionEventType.START_PLAYBACK , hive.PromotionEventType.FINISH_PLAYBACK ,
  hive.PromotionEventType.EXIT , GOBACK
}
 Promotion view event types. More...
 
enum  hive.PromotionBadgeTarget
 Information on which promotional badge is displayed
If NOTICE, it should indicate the badge related to the notice.
 
enum  hive.OfferwallState { hive.OfferwallState.ENABLED , hive.OfferwallState.DISABLED , hive.OfferwallState.UNKNOWN }
 Information of Offerwall(free charging station) button. More...
 

Functions

delegate void hive.Promotion.onPromotionView (ResultAPI result, PromotionEventType promotionEventType)
 Promotion View API Result.
 
delegate void hive.Promotion.onPromotionViewInfo (ResultAPI result, List< PromotionViewInfo > viewInfo)
 Returns HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI.
 
delegate void hive.Promotion.onPromotionBadgeInfo (ResultAPI result, List< PromotionBadgeInfo > badgeInfoList)
 Returns HIVE Promotion badge information.
 
delegate void hive.Promotion.onPromotionBannerInfo (ResultAPI result, List< PromotionBannerInfo > bannerInfoList)
 HIVE Promotion banner information.
 
delegate void hive.Promotion.onAppInvitationData (ResultAPI result, AppInvitationData appInvitationData)
 Return information about request for user invite (UserAcquisition)
 
delegate void hive.Promotion.onEngagement (ResultAPI result, EngagementEventType engagementEventType, EngagementEventState engagementEventState, JSONObject param)
 An event listener for the SDK to engage clients in certain conditions.
 
delegate void hive.Promotion.onAppInvitationSenderInfo (ResultAPI result, AppInvitationSenderInfo senderInfo)
 First sender's information who shared UA invitation.
 
static void hive.Promotion.showPromotion (PromotionType promotionType, Boolean isForced, onPromotionView listener)
 Shows banner such as new event of game or introduce new game.
 
static void hive.Promotion.showCustomContents (PromotionCustomType customType, String contentsKey, onPromotionView listener)
 Show custom Webview to use external content.
 
static void hive.Promotion.showCustomContentsOnGameWindow (PromotionCustomType customType, String contentsKey, onPromotionView listener)
 Show custom Webview to use external content.
 
static void hive.Promotion.showNews (String menu, List< int > giftPidList, onPromotionView listener)
 Shows banner such as new event of game or introduce new game.
 
static OfferwallState hive.Promotion.getOfferwallState ()
 Returns whether the button is available to invoke an offerwall (free recharging station) within the game.
 
static void hive.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.
 
static void hive.Promotion.showNativeReview ()
 Show review popup
Positive ratings and reviews of game users will affect other users' use of the game.
 
static void hive.Promotion.showReview (onPromotionView listener)
 Show review popup
Positive ratings and reviews of game users will affect other users' use of the game.
 
static void hive.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.
 
static void hive.Promotion.getViewInfo (PromotionCustomType customType, String contentsKey, onPromotionViewInfo listener)
 Request HIVE Promotion Webview information so that your UI of webview is configured according to the concept of game UI

 
static void hive.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.
 
static void hive.Promotion.getBannerInfo (PromotionCampaignType campaignType, PromotionBannerType bannerType, onPromotionBannerInfo listener)
 Request banner information
Request banner information for a specific promotion.
 
static void hive.Promotion.getBannerInfoString (String campaignType, String bannerType, onPromotionBannerInfo listener)
 Request banner information
Request banner information for a specific promotion.
 
static void hive.Promotion.getAppInvitationData (onAppInvitationData listener)
 Request user invite information
User acquisition information is provided to attract more users in the game.
 
static void hive.Promotion.showUAShare (String inviteMessage, String inviteLink, onPromotionShare listener)
 Show dialog to share UA url via SNS.
 
static void hive.Promotion.setAdditionalInfo (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.
 
static ResultAPI hive.Promotion.setEngagementReady (Boolean isReady)
 It sets whether Engagement event handling is enabled.
 
static void hive.Promotion.setEngagementListener (onEngagement listener)
 It register the Engagement listener.
 
static Boolean hive.Promotion.processURI (String uri)
 Parse the URI to make it an Event type.
 
static void hive.Promotion.updatePromotionData ()
 /~korean Promotion 정보 갱신 Promotion 새소식 페이지 등의 노출에 필요한 정보를 갱신한다.
 
static void hive.Promotion.getAppInvitationSenderInfo (onAppInvitationSenderInfo listener)
 return first sender's information who shared UA invitation First sender's information can be returned after SDK initialize, login and setEngagementReady(true)
 

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)

Enumeration Type Documentation

◆ OfferwallState

Information of Offerwall(free charging station) button.

Enumerator
ENABLED 

Offerwall Button can be exposed.

DISABLED 

Offerwall Button can not be exposed.

UNKNOWN 

Status unknown.

◆ PromotionCustomType

Types of Promotion CustomView.

Author
kjkim
Enumerator
VIEW 

Customized View.

BOARD 

Customized Board.

SPOT 

Spot Banner.

DIRECT 

Direct Campaign Banner.

◆ PromotionEventType

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

Types of Promotion view.

Author
ryuvsken
Enumerator
BANNERLEGACY 

Full Banner (WebView)

BANNER 

Full Banner.

NEWS 

News.

NOTICE 

Notice.

Function Documentation

◆ getAppInvitationData()

static void hive.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 hive.Promotion.getAppInvitationSenderInfo ( onAppInvitationSenderInfo listener)
static

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

Parameters
listenerAPI call result listener

◆ getBadgeInfo()

static void hive.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 hive.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 hive.Promotion.getBannerInfoString ( String campaignType,
String bannerType,
onPromotionBannerInfo listener )
static

Request banner information
Request banner information for a specific promotion.

Used to retrieve banner information from the game server.

Parameters
campaignTypecampaignType
bannerTypebannerType
handlerAPI call result listener

◆ getOfferwallState()

static OfferwallState hive.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 hive.Promotion.getViewInfo ( PromotionCustomType customType,
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

◆ onAppInvitationData()

delegate void hive.Promotion.onAppInvitationData ( ResultAPI result,
AppInvitationData appInvitationData )

Return information about request for user invite (UserAcquisition)

Parameters
resultAPI call result
appInvitationDataUser invite information.

◆ onAppInvitationSenderInfo()

delegate void hive.Promotion.onAppInvitationSenderInfo ( ResultAPI result,
AppInvitationSenderInfo senderInfo )

First sender's information who shared UA invitation.

Parameters
resultResult of API call
senderInfoFirst sender's userInfo

◆ onEngagement()

delegate void hive.Promotion.onEngagement ( ResultAPI result,
EngagementEventType engagementEventType,
EngagementEventState engagementEventState,
JSONObject param )

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()

delegate void hive.Promotion.onPromotionBadgeInfo ( ResultAPI result,
List< PromotionBadgeInfo > badgeInfoList )

Returns HIVE Promotion badge information.

Parameters
resultAPI call result
badgeInfoListHIVE Promotion badge information

◆ onPromotionBannerInfo()

delegate void hive.Promotion.onPromotionBannerInfo ( ResultAPI result,
List< PromotionBannerInfo > bannerInfoList )

HIVE Promotion banner information.

Parameters
resultAPI call result
bannerInfoListHIVE Promotion banner information

◆ onPromotionView()

delegate void hive.Promotion.onPromotionView ( ResultAPI result,
PromotionEventType promotionEventType )

Promotion View API Result.

Parameters
resultAPI call result
promotionEventTypePromotion event type

◆ onPromotionViewInfo()

delegate void hive.Promotion.onPromotionViewInfo ( ResultAPI result,
List< PromotionViewInfo > viewInfo )

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

Parameters
resultAPI call result
viewInfoHIVE Promotion Webview information

◆ processURI()

static Boolean hive.Promotion.processURI ( 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 hive.Promotion.setAdditionalInfo ( 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

◆ setEngagementListener()

static void hive.Promotion.setEngagementListener ( onEngagement listener)
static

It register the Engagement listener.

Parameters
listener

◆ setEngagementReady()

static ResultAPI hive.Promotion.setEngagementReady ( Boolean 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
bReadyWhether Engagement events can be processed.
Returns
Whether the API call was successful.

◆ showCustomContents()

static void hive.Promotion.showCustomContents ( PromotionCustomType customType,
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 hive.Promotion.showCustomContentsOnGameWindow ( PromotionCustomType customType,
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 hive.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 hive.Promotion.showNativeReview ( )
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 popup is provided. Review popup on the device with iOS 10.3 and later is available to rate and write reviews in apps.

Parameters
listnerAPI result callback Added in HIVE SDK 4.10.0

◆ showNews()

static void hive.Promotion.showNews ( String menu,
List< int > giftPidList,
onPromotionView listener )
static

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

Parameters
menuMenu Management Name
giftPidListgift icon
handlerAPI call result handler

◆ showOfferwall()

static void hive.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 hive.Promotion.showPromotion ( PromotionType promotionType,
Boolean 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 hive.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 popup is provided. Review popup on the device with iOS 10.3 and later is available to rate and write reviews in apps.

Parameters
listnerAPI result callback Added in HIVE SDK 4.10.0

◆ showUAShare()

static void hive.Promotion.showUAShare ( String inviteMessage,
String inviteLink,
onPromotionShare listener )
static

Show dialog to share UA url via SNS.

Parameters
inviteMessageUA invite message
inviteLinkUA invite link
listenerAPI call result listener

◆ updatePromotionData()

static void hive.Promotion.updatePromotionData ( )
static

/~korean Promotion 정보 갱신 Promotion 새소식 페이지 등의 노출에 필요한 정보를 갱신한다.

/~english Update information of Promotion Update promotion data to show Promotion UI.

Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy