[in_app_purchase] Add alternative billing apis for android#6056
Conversation
… handle service unavilable in getBillingConfig
…ring fallback path
…ingOnlyAvailable to android platform addition and billing client wrapper.
…lingOnlyAvailable in platfrom addition and billing_client
| @@ -1,3 +1,7 @@ | |||
| ## 0.3.0+19 | |||
There was a problem hiding this comment.
Nit: As a new feature it should be incrementing the "minor" version (which for <1.0 in Dart convention is the third instead of the second), so this should be 0.3.1.
There was a problem hiding this comment.
Fixed, and thank you for letting me know.
I do think that it is weird that0.3.0+19 is less than 0.3.1
..._app_purchase/in_app_purchase_android/lib/src/in_app_purchase_android_platform_addition.dart
Show resolved
Hide resolved
...se_android/android/src/main/java/io/flutter/plugins/inapppurchase/MethodCallHandlerImpl.java
Show resolved
Hide resolved
...se_android/android/src/main/java/io/flutter/plugins/inapppurchase/MethodCallHandlerImpl.java
Outdated
Show resolved
Hide resolved
..._app_purchase_android/android/src/main/java/io/flutter/plugins/inapppurchase/Translator.java
Outdated
Show resolved
Hide resolved
...roid/lib/src/billing_client_wrappers/alternative_billing_only_reporting_details_wrapper.dart
Outdated
Show resolved
Hide resolved
...purchase/in_app_purchase_android/lib/src/billing_client_wrappers/billing_client_wrapper.dart
Outdated
Show resolved
Hide resolved
...purchase/in_app_purchase_android/lib/src/billing_client_wrappers/billing_client_wrapper.dart
Show resolved
Hide resolved
|
Requesting re-review because I had to modify a decent bit of code to support billing mode as an enum. |
...purchase/in_app_purchase_android/lib/src/billing_client_wrappers/billing_client_wrapper.dart
Show resolved
Hide resolved
...se_android/android/src/main/java/io/flutter/plugins/inapppurchase/MethodCallHandlerImpl.java
Show resolved
Hide resolved
...se_android/android/src/test/java/io/flutter/plugins/inapppurchase/MethodCallHandlerTest.java
Outdated
Show resolved
Hide resolved
...se_android/android/src/test/java/io/flutter/plugins/inapppurchase/MethodCallHandlerTest.java
Show resolved
Hide resolved
...purchase/in_app_purchase_android/lib/src/billing_client_wrappers/billing_client_manager.dart
Outdated
Show resolved
Hide resolved
..._app_purchase/in_app_purchase_android/lib/src/in_app_purchase_android_platform_addition.dart
Outdated
Show resolved
Hide resolved
...pp_purchase/in_app_purchase_android/test/in_app_purchase_android_platform_addition_test.dart
Outdated
Show resolved
Hide resolved
...pp_purchase/in_app_purchase_android/test/in_app_purchase_android_platform_addition_test.dart
Outdated
Show resolved
Hide resolved
|
|
||
| if (billingChoiceMode == BillingChoiceMode.ALTERNATIVE_BILLING_ONLY) { | ||
| // https://developer.android.com/google/play/billing/alternative/alternative-billing-without-user-choice-in-app | ||
| builder.enableAlternativeBillingOnly(); |
There was a problem hiding this comment.
Not an actionable comment, but: Interesting that the billing client builder example they show at the link doesn't call enablePendingPurchases. That must be a mistake in their documentation, right? It is documented as required in all circumstances
https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder#enablePendingPurchases()
There was a problem hiding this comment.
TBH I am not sure. Organizationally I think it should be safe to include because if the caller was going to use alternative billing only then there are no pending purchases to enable or if there are all that happens on the callers side since they are providing the billing implementation.
flutter/packages@0a69259...9385bbb 2024-02-13 louisehsu@google.com Convert startProductRequest(), finishTransaction(), restoreTransactions(), presentCodeRedemptionSheet() to pigeon (flutter/packages#6032) 2024-02-13 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump org.json:json from 20231013 to 20240205 in /packages/in_app_purchase/in_app_purchase/example/android/app (flutter/packages#6096) 2024-02-12 stuartmorgan@google.com [local_auth] Rename iOS classes (flutter/packages#6108) 2024-02-12 jakubwalusiak@gmail.com [video_player_android] Handle BehindLiveWindowException (flutter/packages#5869) 2024-02-12 reidbaker@google.com [in_app_purchase] Add alternative billing apis for android (flutter/packages#6056) 2024-02-12 stuartmorgan@google.com [webview_flutter] Update compileSdk to 34 (flutter/packages#6106) 2024-02-12 37270954+foxtrotravi@users.noreply.github.com [cupertino_icons] Add example to cupertino icons (flutter/packages#5312) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
Seems there is a deadline to switch from manual reporting to the API by March 13. Is there a chance this will be in a release prior to that? Else we'll have to use a patched version or implement our own and then switch over |
|
This was released three weeks ago. |
|
Most all of the apis are available except the combined user choice billing. To get the latest android plugin you will need to reference the android version that was recently released. Also if you are planning on using these apis I would welcome your code review on #6162 which I am hoping to land soon. |
Fixes flutter/flutter/issues/142618
Still left TODO:
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style].///).