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

fix: handle db crash issue on Amazon devices #480

Merged

Conversation

1abhishekpandey
Copy link
Contributor

@1abhishekpandey 1abhishekpandey commented Oct 8, 2024

Description

  • In this PR, we are handling the database crash issue caused on Amazon devices when the app is mostly in the background.
  • We are catching SQLiteCantOpenDatabaseException when we check if the database is accessible or not and if an exception occurs we return false indicating the database is not accessible.
  • If such an exception occurs then all the events will be lost.
  • Values like userId, traits, etc., not stored in the database will continue to be stored in shared preferences as usual.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • Version upgraded (project, README, gradle, podspec etc)
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests for the code
  • I have made corresponding changes to the documentation

@1abhishekpandey 1abhishekpandey self-assigned this Oct 8, 2024
@1abhishekpandey 1abhishekpandey requested a review from a team as a code owner October 8, 2024 08:33
@1abhishekpandey 1abhishekpandey requested review from ChryssaAliferi and removed request for a team October 8, 2024 08:33
Copy link

sonarcloud bot commented Oct 8, 2024

@1abhishekpandey 1abhishekpandey merged commit db717d3 into develop Oct 14, 2024
15 checks passed
@1abhishekpandey 1abhishekpandey deleted the fix/sdk-2430-fix-android-db-crash-on-amazon-devices branch October 14, 2024 16:29
1abhishekpandey added a commit that referenced this pull request Oct 14, 2024
* fix: handle db crash issue on Amazon devices (#480)

* fix: handle SQLiteCantOpenDatabaseException

* chore: improve error message

* chore(release): 1.25.1

---------

Co-authored-by: Abhishek Pandey <[email protected]>
Co-authored-by: GitHub actions <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants