Skip to content

Commit

Permalink
Gdx pay android google billing 5 (#249)
Browse files Browse the repository at this point in the history
* Upgrade to Google Billing 5 (subscriptions and in-app purchases)

Co-authored-by: Lucas Signorini
  • Loading branch information
keesvandieren authored Oct 1, 2022
1 parent 76bc5ff commit d54d736
Show file tree
Hide file tree
Showing 5 changed files with 226 additions and 85 deletions.
11 changes: 9 additions & 2 deletions gdx-pay-android-googlebilling/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# InApp purchasing implementation for Google Play Billing

Handles purchases and restores for non-consumable and consumable products, subscriptions support is work in progress and PRs are welcome.
Handles purchases and restores for non-consumable and consumable products.

Subscriptions are supported with some limitations: the first `SubscriptionOfferDetails` in the list of offers in `ProductDetails` is used.

## Usage

Expand All @@ -22,8 +24,13 @@ Add this to your `AndroidLauncher`'s `onCreate` method:

game.purchaseManager = new PurchaseManagerGoogleBilling(this);

## Purchase items

Google Billing allows multiple products in the same purchase. You can change this setting at Play Console - In App Products - Product Setting - Allow Users to purchase multiple products in one purchase. This library forces handling only one product per transaction, so keep this setting "FALSE", or change as you need.


## Testing
* Upload your compile build with this lib included as an closed alpha build first. This is needed to even being able to add IAPs in the console.
* Add your IAPs and mark them as active
* Add testers to your closed alpha build so they see the new IAPs and also add these testers as "licensed testers" (Settings -> Account details -> Licsensed) so they are not being charged
* Add testers to your closed alpha build so they see the new IAPs and also add these testers as "licensed testers" (Settings -> Account details -> Licensed) so they are not being charged
* Testers must join the alpha test channel and can test (in my experiences they can also test with a debug build)
2 changes: 1 addition & 1 deletion gdx-pay-android-googlebilling/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ configurations {

dependencies {
api project(':gdx-pay-client')
api 'com.android.billingclient:billing:3.0.1'
api 'com.android.billingclient:billing:5.0.0'

testImplementation libraries.junit
}
Loading

0 comments on commit d54d736

Please sign in to comment.