Android
The SDK initialization method is as follows. Please initialize the SDK in your app as soon as possible according to your own situation.
- Java
- Kotlin
Billing.configure(context,"appId","secret")
.setAppUserId("appUserId")
.setListener(new OnBillingClientSetupFinishedListener(){
@Override
public void onBillingSetupFinished(int billingResponseCode) {
}
})
.build();
Billing.configure(context ,"appid" , “secret”).setAppUserId("appUserId").build()
Parameters:
- appId: Generated by AW. For the generation steps, please refer to the document: New Application (External Use)
- secret: Added in V1.0.5.6 and is generated by AW. For the generation steps, please refer to the document: New Application (External Use)
- appUserId: userId,Please do not use special characters, such as: '[` ~! @ # $% ^ & () + = | {} ':', \ \ [\ ] < > /? ~! @ # $%... & () - + | {} 【 】 '; : "",.,?]' , using special characters can cause unexpected problems. No userId can be passed an empty string.
- listener: Initialized listener, which can be empty value. After initialization, the callback result will be successfully returned. onBillingSetupFinished method