javaandroidin-app-billing

Guidance Needed for Implementing In-App Billing and Server Verification in Android Java


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:

Any guidance or corrections would be greatly appreciated, as well as any tips on avoiding common pitfalls with in-app billing implementation.


Solution

  • 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