Hive provides a full banner to
- Expose events effectively to game users
- Encourage users for more participation in games
- Utilize as cross-promotions to advertise other games and give reward
The banner defined by Hive means a Promotion view composed of a single image without letters. If the user clicks the banner, it take the user to the detail page, the external page, or the download page of the game being advertised according to the contents configured in the Hive console. We recommend you to expose Full banner, which displays the banner image in full screen, when user enter the game lobby after login.
Registering a Full Banner on Hive Console
Design the banner image according to the horizontal and vertical mode as follows, and register it on the Hive console. For more information about banner registration, see Guide for Hive Console Promotion.
- Image size of a promotion banner
- Transverse mode: 450×800 px
- Longitudinal mode: 800×450 px
- For the games that use crossplay, please use 1280×720 images.
Displaying Full Banners
To display a full banner, call showPromotion()
method from Promotion class with PromotionType.BANNER
parameter. From Hive SDK v4.12.1, PromotionType.BANNER
displays web-type banner, and other parameters display image view-type banner. When you call PromotionType.BANNERLEGACY
, webview-type banner is displayed as usual.
When displaying a full banner with PromotionType.BANNER
parameter, the image saved on in-app storage is exposed. This image is asynchronously cached when initializing Hive SDK. If full banner is displayed while download is incomplete or failed, its display is skipped.
Followings are sample codes to display a full banner.
API Reference: hive.Promotion.showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 13 |
using hive; PromotionType promotionViewType = PromotionType.BANNER; // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. Boolean isForced = false; // Display a large banner Promotion.showPromotion(promotionViewType, isForced, (ResultAPI result, PromotionEventType viewEventType) => { if (result.isSuccess()) { // call successful } }); |
API Reference: Promotion::showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#include <HIVE_SDK_Plugin/HIVE_CPP.h> using namespace std; using namespace hive; PromotionType promotionViewType = PromotionType::BANNER; // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. bool isForced = false; Promotion::showPromotion(promotionViewType, isForced, [=](ResultAPI result, PromotionEventType viewEventType) { if (result.isSuccess()) { // call successful } }); |
API Reference: Promotion.showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import com.hive.Promotion import com.hive.ResultAPI val promotionViewType = Promotion.PromotionViewType.BANNER // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. val isForced = false Promotion.showPromotion(promotionViewType, isForced, object : Promotion.PromotionViewListener { override fun onPromotionView(result: ResultAPI, promotionEventType: Promotion.PromotionViewResultType) { if (result.isSuccess) { // call successful } } }) |
API Reference: com.hive.Promotion.showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import com.hive.Promotion; import com.hive.ResultAPI; Promotion.PromotionViewType promotionViewType = Promotion.PromotionViewType.BANNER; // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. boolean isForced = false; Promotion.INSTANCE.showPromotion(promotionViewType, isForced, (result, promotionEventType) -> { if (result.isSuccess()) { // call successful } }); |
API Reference: PromotionInterface.showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 |
import HIVEService let promotion: PromotionViewType = .banner // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. let isForced = false PromotionInterface.showPromotion(promotionViewType, isForced: isForced) { result, viewResultType in if result.isSuccess() { // call successful } } |
API Reference: HIVEPromotion::showPromotion
1 2 3 4 5 6 7 8 9 10 11 12 |
#import <HIVEService/HIVEService-Swift.h> HIVEPromotionViewType promotionViewType = HIVEPromotionViewTypeBANNER; // If true, the 'Do not watch again today' button will not be displayed. Even if the user has already set it not to be seen again today, it is ignored and a large banner is displayed. BOOL isForced = NO; [HIVEPromotion showPromotion: promotionViewType isForced: isForced handler: ^(HIVEResultAPI *result, HIVEPromotionViewResultType viewResultType) { if ([result isSuccess]) { // call successful } }]; |