Welcome to in-app-purchase (Android Studio Java*)
In this repository, I'm going to show you how to integrate In-App Purchase of Google Play Billing version 4+ in 6 steps.
Part-2: • Android Google Billing Library v4 In ...
Part-3: Coming Subscribe and turn on the bell to be notified.
Pre-requisite
Google Play Console Account
Published App on Play Store
Tester Device with GMS
Configure Your Testing device by adding the Gmail account to internal testing testers and License testing (Watch the YouTube video for clarity)
Setup the in-app purchase products in the Google Play Console account
I have already created mine which are
Product ID: clicks_5
Product ID: clicks_10
Product ID: clicks_50
The following methods (These are the methods you need for the IAP System to work, you can copy and paste)
void connectGooglePlayBilling(){}
void getProducts(){}
void launchPurchaseFlow(){}
void verifyPayment(Purchase purchases){}
void giveCoins(){}
Step 0: //Add the Google Play Billing Library dependency
Step 1: //Initialize a BillingClient with PurchasesUpdatedListener
Step 2: //Establish a connection to Google Play
Step 3: //Show products available to buy
Step 4: //Launch the purchase flow
Step 5: //Processing purchases / Verify Payment
Step 6: //Handling pending transactions
First, we will look at consumable items/products