Skip to content

Feature/database file export - #39

Merged
tinazhang128 merged 7 commits into
awareframework:betafrom
EcZww:feature/database-file-export
May 4, 2024
Merged

Feature/database file export#39
tinazhang128 merged 7 commits into
awareframework:betafrom
EcZww:feature/database-file-export

Conversation

@EcZww

@EcZwwEcZww commented May 4, 2024

Copy link
Copy Markdown
Collaborator

4.2.1.beta

Support exporting files to a specified directory #37

  • For Android API Level < 28
    • Export Directory : Downloads/AWARE
    • Method: Uses Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) to access the common Downloads directory, ensuring easy user access and compatibility with multiple file manager apps.
    • Devices running Android versions before API Level 28 do not enforce Scoped Storage, allowing apps to freely write to shared storage directories after obtaining the necessary permissions.
  • For Android API Level >= 28
    • Export Directory: User decide
    • For devices on Android API Level 28 and above, the implementation ensures compatibility with Android’s Scoped Storage model introduced in Android 10 (API Level 29). This model limits access to external storage to protect user privacy and system integrity.
    • Scoped Storage Compliance: Utilizes the Storage Access Framework (SAF) for API levels where Scoped Storage is enforced. This allows users to select directories via a system file picker, granting the app temporary access to the chosen location.

EcZww added 7 commits April 21, 2024 00:14
Support exporting files to a specified directory.
Resolved an issue where the application failed to correctly identify the internal database file path. Additionally, comments have been added.
Resolved an issue where the text buffer was incorrectly reset upon every foreground app change, leading to potential loss of relevant data. Introduced a new buffer, textBuffer_app_change, dedicated to managing text hashes specifically during app transitions.
- Replace ArrayList with HashSet for textBuffer to improve duplicate check performance
- Streamline contentBuffer flushing and handling logic to commit changes specifically on app change
@EcZww
EcZww requested a review from tinazhang128May 4, 2024 03:11
@EcZwwEcZww self-assigned this May 4, 2024

@tinazhang128tinazhang128 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@tinazhang128
tinazhang128 merged commit 519c981 into awareframework:betaMay 4, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@EcZww@tinazhang128