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

File Copy Implementation #61

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

rtsketo
Copy link

@rtsketo rtsketo commented Feb 20, 2023

Code Refinements:

  • The PdfViewerActivity now includes a more refined permission check for WRITE_EXTERNAL_STORAGE, taking into account the different API levels and their permission models. This is critical for Android 6.0 (Marshmallow) and above, where runtime permissions are required.
  • Enhanced file handling with FileUtils, which includes a new method for copying files, copyFile(..). This addresses a need to manipulate files within the app's scope effectively, following best practices for file storage.
  • The downloadFile(..) function has been improved to use Environment.getExternalStoragePublicDirectory(), which is a more standardized way to access shared storage in a manner consistent with Android's scoped storage model.

Code Cleanup:

  • Removed unnecessary imports, which cleans up the codebase and possibly improves build time and performance.
  • Streamlined the code by removing redundant calls and ensuring that the app's behavior aligns with the expected permissions flow, especially around storage access which has been a point of significant change in recent Android versions.

Gradle Updates:

  • Upgraded the targetSdkVersion to 33, preparing the app for the latest Android OS compatibility.
  • Replaced the deprecated android.support:multidex with androidx.multidex:multidex, aligning with AndroidX migration.
  • Updated various dependencies to their latest versions, including Kotlin, JUnit, and Espresso. This ensures that the app is using the most up-to-date libraries, which often include important bug fixes and performance improvements.

Manifest Adjustments:

  • Made changes to the AndroidManifest.xml file, which could include updating the permissions, activity declarations, or adjusting the application's metadata.

Visual Assets:

  • Lowered the size of the image files.

ImgBotApp and others added 2 commits February 20, 2023 11:19
*Total -- 68.92kb -> 55.78kb (19.06%)

/Screenshot from 2020-07-12 13-30-51.png -- 42.47kb -> 30.83kb (27.4%)
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -- 10.40kb -> 9.54kb (8.33%)
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -- 7.72kb -> 7.27kb (5.88%)
/app/src/main/res/mipmap-hdpi/ic_launcher.png -- 3.51kb -> 3.43kb (2.14%)
/app/src/main/res/mipmap-xhdpi/ic_launcher.png -- 4.81kb -> 4.71kb (2.07%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for contributing to this project. This is your first pull request and we are so glad to have you onboard. We will review the request and get back to you soon.

@afreakyelf
Copy link
Owner

Can you please add the reason why did you add copyFile method in the description?

@hiteshsarsava
Copy link

You need merge this PR. As it's handle write external storage permission above Android 11 @afreakyelf

Copy link
Owner

@afreakyelf afreakyelf left a comment

Choose a reason for hiding this comment

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

Hi @rtsketo can you update your PR with latest changes please.

Copy link

github-actions bot commented Jan 1, 2024

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Jan 1, 2024
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants