Lebi
In China, Google Play Store is not available so thatHive platform creates an in-app purchase module, 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 Lebi Store. Preparing for user choice, build a payment system paid by Lebi by following the below. Note that iOS does not support Lebi market.
Note
Chinese players using Lebi with Authentication v4 needs to sign in Membership.
Flowchart to Connect with Lebi Store¶
Store Selecting Screen¶
If you can provide both the Google Play Store and the Lebi Store, you should call the showMarketSelection()
method to display a screen allowing the user to select a store between them, after receiving both the Google Play Store and Lebi Market codes as a result of the marketConnect()
method call (the IAP v4 initialization).
- A sample screen when an Android-based device has two stores available; Google Play Store and Lebi Store
Followings are sample codes to request a screen to select a store.
API Reference: hive .IAPV4.showMarketSelection
API Reference: IAPV4 ::showMarketSelection
API Reference: IAPV4.showMarketSelection
API Reference: IAPV4 .INSTANCE.showMarketSelection
Lebi Balance Search¶
When user selects 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.
API Reference: hive .IAPV4.getBalanceInfo
API Reference: IAPV4 ::getBalanceInfo
API Reference: IAPV4.getBalanceInfo
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.
API Reference: hive .IAPV4.showCharge
API Reference: IAPV4 ::showCharge
API Reference: IAPV4.showCharge
API Reference: IAPV4 .INSTANCE.showCharge