In China, Google Play Store is not available so that Hive creates an in-app purchase module, Hive Lebi Store. Users in China, therefore, can purchase items by charging Lebi, the virtual currency.
Depending on the types of device, Android-based devices are available to select Google Play Store or Hive Lebi Store. Preparing for user choice, build a payment system paid by Lebi by following the below. Note that iOS does not support Hive Lebi market.

 

Flowchart to Connect with Hive Lebi Store

Store Selecting Screen

If Google Play Store and Hive Lebi Store are available, provide a screen in the game for user to select one of stores. Call showMarketSelection() method of IAPV4 class to make available for the screen for store selection.

  • A sample screen when an Android-based device has two stores available; Google Play Store and Hive Lebi Store


Followings are sample codes to request a screen to select a store.

Unity®

API Reference: hive .IAPV4.showMarketSelection

C++

API Reference: IAPV4 ::showMarketSelection

Kotlin

API Reference: IAPV4.showMarketSelection

Java

API Reference: IAPV4 .INSTANCE.showMarketSelection

Lebi Balance Search

When user selects Hive Lebi Store, call getBalanceInfo() method of IAPV4 class to request and display the Lebi balance. You can receive the value as balance from getBalanceInfo().
Followings are sample codes to request the balance of Lebi.

Unity®

API Reference: hive .IAPV4.getBalanceInfo

C++

API Reference: IAPV4 ::getBalanceInfo

Kotlin

API Reference: IAPV4.getBalanceInfo

Java

API Reference: IAPV4 .INSTANCE.getBalanceInfo

Lebi Charging Screen

When Lebi is lack of its balance, call showCharge() from IAPV4 class to show the charging screen. After charging Lebi, you can check the balance with the variable named balance, from the result of showCharge().
Followings are sample codes to call the page of charging Lebi.

Unity®

API Reference: hive .IAPV4.showCharge

C++

API Reference: IAPV4 ::showCharge

Kotlin

API Reference: IAPV4.showCharge

Java

API Reference: IAPV4 .INSTANCE.showCharge