redsolver / noteless

A Markdown-based note-taking app for mobile devices.
MIT License
495 stars 44 forks source link

Data Directory -> Use external storage #77

Open wolfisberg opened 3 years ago

wolfisberg commented 3 years ago

Hi

Can you explain to me, how the Data Directory -> Use external storage / Location options are supposed to work?

When I toggle the Use external storage option to active and try to set a location, the following happens:

  1. Some file browser opens
  2. I can choose between SD Card and NextCloud (I have the NC app installed)
  3. When I chose a location on either the SD card or in the NC app, it asks for access permission
  4. I grant permission
  5. The app returns to settings
  6. Nothing seems to have changed
  7. New notes I save don't seem to be saved to the chose location
  8. The Location configuration still shows the same path as before (neither the SC card nor the NC directory)

I'm basically trying to sync my notes to NextCloud. I'm trying to avoid using syncthing or foldersync because I already have a nextcloud taking care of my file sync needs...

Gregory-K commented 3 years ago

Possible duplicate of #63 but I can attest to the same problem as described above, running version 1.4.6 on Android 8.0

wolfisberg commented 3 years ago

I'm running 1.4.6 on Android 10 though.

redsolver commented 3 years ago

Thanks for reporting this, Android 10 and 11 added some limitations in external folder access which are not consistent between different manufacturers. This results in the current implementation for external storage not working on some Android 10/11 devices. It's being worked on fixing these bugs/limitations in the file picker plugin used by Noteless: https://github.com/miguelpruivo/flutter_file_picker/issues/745

glow12121 commented 3 years ago

I have the same issue on an Android 6 derivative, MIUI 10.2 (a Xiaomi platform).

JohnVeness commented 3 years ago

Same here on Android 9.

felipemurro commented 3 years ago

Same here, on Galaxy S9 running Android 10. I'll wait for the fix. Version 1.3.1 working well

Fierce-Ninja commented 3 years ago

Same issue here on Samsung Galaxy note 9 running Android 10. @redsolver can you please comment on ETA. This is kinda deal-breaking important to me. Would appreciate a constructive response!

Fierce-Ninja commented 3 years ago

@redsolver you mentioned that you are dependent on the file picker plugin issue. But I checked that link and it shows it has been fixed since July. What gives? Am I misinterpreting their fix and its impact on your app?

redsolver commented 3 years ago

The main issue is that how this works is not consistent between different manufacturers, so I can't really test it on my own devices. I will take a closer look at this issue in the next days and try to implement all changes made and recommended by the plugin I'm using, then I will publish a beta APK in this thread. It would then be essential that this beta APK is tested on as many different devices as possible.

Fierce-Ninja commented 3 years ago

Thank you @redsolver for the prompt response. I will be happy to beta test on my device. Warning - not too technical here though, but will be happy to do whatever I can to help.

redsolver commented 3 years ago

@Fierce-Ninja here is the test APK, please let me know if it works. Thanks!

Beta APK Download link: https://siasky.net/AADBBPze_gDKbR3DzTrtH76Tcf9gg056igI6Z_fkyX8dEA

JohnVeness commented 3 years ago

Hi, I'm not @Fierce-Ninja , but just to let you know that this test APK doesn't fix the problem for me, on my Android 9 (Fxtec Pro 1).

redsolver commented 3 years ago

ok, so I just looked into the problem again. The linked PR only fixed an issue where picking directories would return an empty path as a result. It is now possible to pick directories and read files from there, but unfortunately Noteless can't write to the selected directory. This is likely because apps now need to use the Storage Access Framework to modify files in external storage. The advantages of using SAF are that you could for example pick a Google Drive folder and use that too (don't know if that works). Unfortunately Flutter/Dart doesn't seem to support using SAF to access files directly yet.

The feature Noteless needs is tracked here: https://github.com/miguelpruivo/flutter_file_picker/issues/721

stahlsau commented 3 years ago

Hi guys, I can confirm that the beta doesn't solve the issue. Had it working before on android 11, but had to downgrade because of other things. On android 10 it doesn't work for me, sadly. Anyhow, best note taking app out there, thanks for that! I hope you'll get it fixed at some time.