Skip to content

Pl - #190

Merged
WirelessAlien merged 9 commits into
masterfrom
pl
Sep 1, 2026
Merged

Pl#190
WirelessAlien merged 9 commits into
masterfrom
pl

Conversation

@WirelessAlien

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Billing failures can revoke valid entitlements, and several lifecycle and entitlement-state defects remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds premium billing, purchase-status checks, subscription management, and flavor-specific onboarding behavior.

Changes:

  • Integrates Google Play Billing for the full flavor with FOSS-compatible stubs.
  • Adds premium purchase UI, settings, entitlement checks, and warning states.
  • Updates startup flows and OMDb setup behavior.
File summaries
File Description
app/build.gradle.kts Adds billing dependencies and updates version.
app/src/main/res/xml/preferences.xml Adds premium and subscription preferences.
app/src/main/res/values/strings.xml Adds billing-related text.
app/src/main/res/layout/fragment_billing_bottom_sheet.xml Defines the purchase sheet UI.
app/src/main/java/.../SyncProviderBottomSheet.kt Starts FOSS OMDb setup after sync selection.
app/src/main/java/.../SettingsFragment.kt Adds purchase and subscription settings.
app/src/main/java/.../MainActivity.kt Schedules billing checks and updates onboarding.
app/src/full/java/.../work/BillingCheckWorker.kt Periodically validates purchases.
app/src/full/java/.../helper/BillingHelper.kt Implements Google Play Billing operations.
app/src/full/java/.../fragment/BillingBottomSheetFragment.kt Implements the full-flavor purchase flow.
app/src/full/java/.../data/PurchaseStatus.kt Defines purchase states.
app/src/foss/java/.../work/BillingCheckWorker.kt Provides the FOSS worker stub.
app/src/foss/java/.../helper/BillingHelper.kt Provides the FOSS billing stub.
app/src/foss/java/.../fragment/BillingBottomSheetFragment.kt Provides the FOSS purchase-sheet behavior.
app/src/foss/java/.../data/PurchaseStatus.kt Defines FOSS purchase states.
Review details
  • Files reviewed: 15/15 changed files
  • Comments generated: 8
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +242 to +254
} else if (resultInApp.responseCode == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED ||
resultInApp.responseCode == BillingClient.BillingResponseCode.SERVICE_UNAVAILABLE ||
resultInApp.responseCode == BillingClient.BillingResponseCode.ERROR) {
if (resultInApp.responseCode == BillingClient.BillingResponseCode.ERROR ||
resultInApp.responseCode == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED) {
if (checkLocalPremiumStatus() == PurchaseStatus.PURCHASED) {
onResult(PurchaseStatus.PURCHASED)
return@queryPurchasesAsync
}
}
onResult(PurchaseStatus.ERROR)
return@queryPurchasesAsync
}
Comment on lines +285 to +297
} else if (resultSubs.responseCode == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED ||
resultSubs.responseCode == BillingClient.BillingResponseCode.SERVICE_UNAVAILABLE ||
resultSubs.responseCode == BillingClient.BillingResponseCode.ERROR) {
if (resultSubs.responseCode == BillingClient.BillingResponseCode.ERROR ||
resultSubs.responseCode == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED) {
if (checkLocalPremiumStatus() == PurchaseStatus.PURCHASED) {
onResult(PurchaseStatus.PURCHASED)
return@queryPurchasesAsync
}
}
onResult(PurchaseStatus.ERROR)
return@queryPurchasesAsync
}
Comment on lines +321 to +326
val offerToken = productDetails.subscriptionOfferDetails?.firstOrNull()?.offerToken
if (offerToken != null) {
setOfferToken(offerToken)
} else {
return@apply
}
package com.wirelessalien.android.moviedb.data

enum class PurchaseStatus {
PURCHASED,
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
billingHelper = BillingHelper(requireContext(), lifecycleScope) { _, _ -> }
billingHelper.checkPurchases { _ ->
if (hasActivePurchase && billingErrorTimestamp > 0) {
val currentTime = System.currentTimeMillis()
val timeElapsed = currentTime - billingErrorTimestamp
val timeLeft = 259200000L - timeElapsed

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
isCancelable = false
Comment on lines +113 to +114
billingHelper = BillingHelper(requireContext(), lifecycleScope) { status, errorMessage ->
lifecycleScope.launch(Dispatchers.Main) {
@WirelessAlien
WirelessAlien merged commit 72a9800 into master Sep 1, 2026
4 checks passed
@WirelessAlien
WirelessAlien deleted the pl branch September 1, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants