The iap_demo App demonstrates Huawei VR Pay client APIs and usages.
Huawei VR Pay is a payment service provided by Huawei in-app Purchases in VR devices. Currently, only the api for customizing prices is provided. CP need to define offering information in their apps.
Disclaimer: The demo only demonstrates the purchase procedure, and it does not have a real use of purchased products.
Check whether the Android studio development environment is ready. Open the sample code project directory with file "build.gradle" in Android Studio.
Finish the configuration in AppGallery Connect. See details: Configuring AppGallery Connect
To build this demo, please first import the demo in the Android Studio (3.x+).
Configure the sample code:
AndroidManifestfile and change the value of package to your app package name.
Run the sample on your Android device or emulator.
Android SDK Version >= 22 and JDK version >= 1.8 is recommended.
Once you start the demo, you should be able to see the following page.
Tap 确认支付 ¥0.01, the demo will call the
pay API, and jump to the checkout page which is provided by IAP Service.
Once purchase succeed, IAP Service will display the purchase result.
If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.
If you have questions about how to use HMS samples, try the following options:
This demo is licensed under the Apache License, version 2.0.
：Code submit frequency
：React/respond to issue & PR etc.
：Well-balanced team members and collaboration
：Recent popularity of project
：Star counts, download counts etc.