I'm working on implementing in-app billing for subscriptions in my Android app using Java, but I'm encountering some difficulties, particularly with server-side verification.
What I've Done So Far:
Issues I'm Facing:
What I Need Help With:
A clear explanation or example of how to implement server-side verification for subscriptions using Java.
Best practices for testing in-app billing, especially for subscriptions.
Any resources or tutorials that are current and focus on the latest version of the Google Play Billing Library.
Any guidance or corrections would be greatly appreciated, as well as any tips on avoiding common pitfalls with in-app billing implementation.
Android In-App Billing Library v4+
A simple implementation of the Android In-App Billing API.
Getting Started
● Add the dependency in your app's build.gradle file:
dependencies {
implementation 'com.github.moisoni97:google-inapp-billing:1.0.5'
}
● Create an instance of BillingConnector class. Constructor will take 2 parameters:
● Context
● License key from *Play Console*
billingConnector = new BillingConnector(this, "license_key")
.setConsumableIds(consumableIds)
.setNonConsumableIds(nonConsumableIds)
.setSubscriptionIds(subscriptionIds)
.autoAcknowledge()
.autoConsume()
.enableLogging()
.connect();
More Info. on Github :- https://github.com/Mahadev-code/Android-inApp-Billing