Commit b505f36
committed
fix: Corrected BillingClient usage in SupportRepository
This commit addresses issues with the Google Play Billing Library integration in `SupportRepository.java`:
- **BillingClient Initialization:** Added `enableAutoServiceReconnection()` during BillingClient setup as a best practice for v8+ of the library.
- **Product Details Query:**
- Corrected the lambda expression in `queryProductDetailsAsync` to properly accept a single `QueryProductDetailsResult` object, aligning with the official documentation.
- Ensured that `productDetailsList` is retrieved from the `QueryProductDetailsResult` object.
- **Purchase Initiation:**
- Updated `initiatePurchase` to correctly use `setOfferToken()` when building `BillingFlowParams.ProductDetailsParams`.
- Simplified the creation of `productDetailsParamsList` using `Collections.singletonList()`.1 parent 044f056 commit b505f36
File tree
4 files changed
+25
-17
lines changed- .idea
- gradle
- wrapper
4 files changed
+25
-17
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
0 commit comments