phone-saver icon indicating copy to clipboard operation
phone-saver copied to clipboard

Use com.android.documentsui instead of directly write to `/sdcard' in newer platforms

Open amtlib-dot-dll opened this issue 7 years ago • 13 comments

In newer Android versions, this app may just apply for a destination directory and write shared files to it.

Benefits:

  • No android.permission.WRITE_EXTERNAL_STORAGE needed
  • Ability to save to Google Drive, OneDrive and other android.provider.DocumentsProviders
  • Another mode available where users can rename his or her file

Thank you very much!

amtlib-dot-dll avatar Sep 12 '17 01:09 amtlib-dot-dll

And https://github.com/ScreamingHawk/phone-saver/issues/26 would be fixed, as another benefit.

amtlib-dot-dll avatar Sep 12 '17 01:09 amtlib-dot-dll

It sounds like you are a lot more familiar with this process than I am.

Would this work for older versions of Android also? Would you be able to submit a pull request with a fix for this?

I'll absolutely have your name added to the credits in app if you were to solve this issue for me.

ScreamingHawk avatar Sep 12 '17 02:09 ScreamingHawk

At least 4.4 KitKat. I wrote some Android code two years ago and if I have some time to rebuild my development platform I would have a try. By the way, it is easy to learn.

amtlib-dot-dll avatar Sep 12 '17 16:09 amtlib-dot-dll

Another related ticket as per OP #34

ScreamingHawk avatar Sep 12 '17 21:09 ScreamingHawk

is this point still being looked at? It's sort of the only small annoyance in an otherwise brilliant program for me.

mhellwig avatar Apr 18 '18 14:04 mhellwig

at least the error message when attempting to save to external sd in a new version of Android could be more informative.

mhellwig avatar Apr 18 '18 14:04 mhellwig

@mhellwig I haven't been actively looking at this, as I've been busy on other projects. This is by the far the biggest request I've had for the app.

I welcome any pull requests if you have the time and expertise to fix the issue. I'll make sure to stick a thanks in the change log alongside the update for all to see as well.

ScreamingHawk avatar Apr 30 '18 21:04 ScreamingHawk

Ok, I've picked this up. This is going to require a huge change to the code base and may introduce a number of bugs. It's also restricted to a KitKat+ which is higher than the base API level I support.

Will release this under a new major version number due to potentially breaking changes.

Undecided if the setting should be enabled by default or not.

ScreamingHawk avatar May 02 '18 00:05 ScreamingHawk

Pushing to beta stream on Play Store as 4.0.0. Please let me know if you have success / issues with this feature.

I've kept it off by default. If there are no problems, I'll switch the enabled by default

ScreamingHawk avatar May 02 '18 01:05 ScreamingHawk

May you also push this new version to F-Droid? Thank you very much!

amtlib-dot-dll avatar May 02 '18 07:05 amtlib-dot-dll

@amtlib-dot-dll There's a couple bugs. You don't want this version. :laughing: I'll fix it tomorrow

AFAIK you can't ask FDroid to update the app version. They have their own schedule for updating the apps that is a mystery to me.

ScreamingHawk avatar May 02 '18 08:05 ScreamingHawk

Released v4.0.2 to beta stream which has a number of fixes. Looking a lot more stable now

ScreamingHawk avatar May 03 '18 00:05 ScreamingHawk

Note to F-Droid users: I recommend you avoid v4.0.1 and wait for v4.0.2

ScreamingHawk avatar May 03 '18 01:05 ScreamingHawk