object IAPConstant {
const val ID_TEST: String = "android.test.purchased"
/**
* List Product IDs for subscription
*/
val listConfigSub = arrayListOf<String>(
ID_TEST
)
/**
* List Product IDs for purchase
*/
val listConfigPur = arrayListOf<String>(
ID_TEST
)
/**
* List all product IDs that will turn off ads,
* including all product id subscriptions and purchases that have a function that won't show ads
*/
val listPackageRemoveAds = arrayListOf<String>(
ID_TEST
)
/**
* List all product IDs can Purchase Multi Time
*/
val listProductIdPurchaseMultiTime = arrayListOf<String>(
ID_TEST
)
}
public class IAPConstant {
public static final String ID_TEST = "android.test.purchased";
/**
* List Product IDs for subscription
*/
public static final List<String> listConfigSub = new ArrayList<String>() {{
add(ID_TEST);
}};
/**
* List Product IDs for purchase
*/
public static final List<String> listConfigPur = new ArrayList<String>() {{
add(ID_TEST);
}};
/**
* List all product IDs that will turn off ads,
* including all product id subscriptions and purchases that have a function that won't show ads
*/
public static final List<String> listPackageRemoveAds = new ArrayList<String>() {{
add(ID_TEST);
}};
/**
* List all product IDs that can be purchased multiple times
*/
public static final List<String> listProductIdPurchaseMultiTime = new ArrayList<String>() {{
add(ID_TEST);
}};
}
This function configures and enables in-app purchase (IAP) features within the application. It is usually declared in the Application class and must be updated whenever there are changes to IAP functionalities, such as enabling or disabling features, or modifying purchase packages.
fun initBilling(context: Context, provider: SDKIAPProductIDProvider?)
The IKBillingProvider interface extends the SDKIAPProductIDProvider interface, allowing you to use both interfaces interchangeably. This enables access to the methods defined in both interfaces while maintaining a clear and flexible structure for managing in-app purchases (IAP) and product IDs.