Skip to content

Migrate to Google Play Billing Library 9.1.0#842

Open
SpertsyanKM wants to merge 4 commits into
developfrom
kamo/dev-1196-migrate-android-sdk-to-google-play-billing-library-9
Open

Migrate to Google Play Billing Library 9.1.0#842
SpertsyanKM wants to merge 4 commits into
developfrom
kamo/dev-1196-migrate-android-sdk-to-google-play-billing-library-9

Conversation

@SpertsyanKM

Copy link
Copy Markdown
Contributor

Summary

Upgrades the SDK from Google Play Billing Library 8.1.0 to 9.1.0.

The heavy v7→v8 migration was already done earlier, so this step is small:

  • Bump com.android.billingclient:billing 8.1.0 → 9.1.0
  • Bump compileSdk/targetSdk 34 → 35 in sdk, nocodes, sample (PBL 9 targets SDK 35)
  • Handle nullable PackageInfo.versionName in EnvironmentProvider (nullability tightened in SDK 35) — falls back to UNKNOWN
  • Drop dead SkuDetails-based test helpers (SkuDetails class removed in PBL 9) and a stale KDoc mention

Behavior change shipped by PBL 9 (no code change needed)

When the Play Store app is blocked by the system (e.g. OEM kids mode), connection setup now finishes with BILLING_UNAVAILABLE instead of generic ERROR. In our BillingClientHolder this routes into the existing onBillingClientUnavailable branch, so queued requests fail fast with a meaningful BillingUnavailable error instead of hanging until reconnect — strictly better than the previous behavior.

Not included (possible follow-up): exposing new v9 sub-response codes (PAYMENT_DECLINED_DUE_TO_INSUFFICIENT_FUNDS, USER_INELIGIBLE) through the public error API.

Testing

  • :sdk:assembleRelease, :nocodes:assembleRelease — OK
  • :sample:assembleDebug — OK (samples are not CI-gated)
  • :sdk:testReleaseUnitTest, :nocodes:testReleaseUnitTest — OK
  • detektAll — OK

Linear: DEV-1196

🤖 Generated with Claude Code

https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw

SpertsyanKM and others added 4 commits July 17, 2026 13:57
- Bump billingclient 8.1.0 -> 9.1.0
- Bump compileSdk/targetSdk to 35 (required by PBL 9)
- Handle nullable PackageInfo.versionName (nullability tightened in SDK 35)
- Fix stale SkuDetails KDoc mention

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
SkuDetails class was removed in Billing Library 9. The helpers had no
usages left in tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
mockSubsSkuDetailsJson/mockInAppSkuDetailsJson, their constants and the
billingclient wildcard import had no consumers left after removing the
SkuDetails-based helpers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
mockSubsPurchase/mockInAppPurchase/mockIncorrectSubsPurchase and the
whole Constants object had no usages; only the reflection helpers
remain in test utils.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant