Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve IAP handling #1603

Merged
merged 5 commits into from
Aug 9, 2023
Merged

Improve IAP handling #1603

merged 5 commits into from
Aug 9, 2023

Conversation

khaykov
Copy link
Member

@khaykov khaykov commented Aug 8, 2023

This PR fixes some ANR's that result from billing service. Despite following Google's guidelines, we are getting ANR's when initializing billing service, so I moved some calls to background thread, and added a backoff logic.

Backoff logic:

  • Comment out this line.
  • Add debuggable true to the release config. Should look like this:
release {
            debuggable true
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
  • Launch app in release configuration.
  • In the logcat, confirm that you see IapViewModel I Billing response OK
  • Open device settings, navigate to Apps, and find Play Store.
  • Clear Play Store storage.
  • Check logcat, and confirm that you see IapViewModel I Retrying billing service connection after 1000 MS delay
  • Do this again, and confirm that same message with 2000 MS delay.
  • etc.

Afte this:

  • Confirm that billing flow works by purchasing sustainer plan.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 8, 2023

You can test the changes on this Pull Request by downloading an installable build (simplenote-android-installable-build-pr1603-eaed77e-0189db1f-571c-42ff-abf5-c589fee75e82.apk), or scanning this QR code:

@khaykov khaykov marked this pull request as ready for review August 8, 2023 16:21
@khaykov khaykov requested a review from danilo04 August 8, 2023 16:21
Copy link
Contributor

@danilo04 danilo04 left a comment

Choose a reason for hiding this comment

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

Hi @khaykov, this is working as expected. Great job here!!

@danilo04 danilo04 merged commit 346de06 into trunk Aug 9, 2023
9 checks passed
@danilo04 danilo04 deleted the issue/fix-iap-anr branch August 9, 2023 16:56
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.

None yet

3 participants