Use Huawei In App Billing property

Official Content
This documentation is valid for:
Specifies if the application uses In-App Billing when generating for the Huawei platform.

Values

False
True

Scope

Objects: Menu, Panel, Work With
Generators: Android

Description

Defines if the generated application will use the Huawei-specific In-App Purchases platform called HUAWEI In-App Purchases (IAP) to monetize your app.

When this property is enabled, remember to follow these steps to correctly configure the account and enable the Merchant Service. Once the process is approved, you need to:

For testing purposes, you can add different HuaweiID users to the application Sandbox Testing environment, so no charges will be made to your credit card when purchasing products. The following warning message will appear before starting with the purchase process:

Sandbox test
This is a test. The system will skip the payment process without deducting any fees.
[OK]

Troubleshooting

Null pointer exception on com.genexus.inappbillinglib.util.SkuDetails.getSku()

The following error occurs when using the StoreManager PurchaseProduct method:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.genexus.inappbillinglib.util.SkuDetails.getSku()' on a null object reference
        at com.genexus.inappbillinglib.StoreManager$3.invoke(StoreManager.java:137)
        at com.artech.externalapi.ExternalApi.invokeMethod(ExternalApi.java:276)
        at com.artech.externalapi.ExternalApi.execute(ExternalApi.java:70)
        at com.artech.actions.ApiAction.runExternalObjectMethod(ApiAction.java:76)
        at com.artech.actions.ApiAction.Do(ApiAction.java:57)
        at com.artech.actions.CompositeAction.Do(CompositeAction.java:119)
        at com.artech.actions.ActionExecution$2.doInBackground(ActionExecution.java:363)
        at com.artech.actions.ActionExecution$2.doInBackground(ActionExecution.java:352)
        at com.artech.utils.TaskRunner.lambda$executeOnExecutor$2(TaskRunner.java:22)
        at com.artech.utils.-$$Lambda$TaskRunner$epLfyblLY1hXkfy5GrschUD8-W0.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:784)

If you are executing on a device with Google Services, the Huawei configuration is not taken into account; configure the Google In-App Billing instead.

Runtime/Design time

This property applies only at design-time.

How to apply changes

To apply the corresponding changes when the property value is configured, Build the Main Object.

Availability

This property is available since GeneXus 17 upgrade 2.

See Also

Main Platform property
Huawei In App Public Key property
Huawei Services File property
StoreManager external object