Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

add external sd card support for android version >= 5 #3

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

npes87184
Copy link
Contributor

When user selects target directory, it will check whether it can write or not.
If it can not write:

  • trigger storage access framework for android version >= 5.0.
  • show error dialog in android 4.4

To write to external sd card, we need to use documentFile. I modify the newNovelWriter. According to android version and target directory, it will create proper OutputStreamWriter .

Demo video for settingFragment: Youtube

Note: I have tested it on my samsung s7 with android version = 7.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants