This repository has been archived by the owner on Mar 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fixed getExternalFilesDir null issue #557
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Thank you for making a pull request ! Just a gentle reminder :) | ||
|
||
1. If the PR is offering a feature please make the request to our "Feature Branch" 0.11.0 | ||
2. Bug fix request to "Bug Fix Branch" 0.10.8 | ||
2. Bug fix request to "Bug Fix Branch" 0.10.9 | ||
3. Correct README.md can directly to master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getExternalStorageDirectory()
is the root directory of sd card and files stored there will not be deleted when application is uninstalled. Not sure if this is what we want to do, put some application files in a root of sdcard.The other thing is that
getSystemfolders()
is used bygetConstants()
which are pre-defined keys exposed to JavaScript, and I'm sure they are not updated during runtime, only taken once on module load (they're constants right :) ). So external storage state can change andgetExternalStorageDirectory()
orgetExternalFilesDir()
should be invoked when needed, something like:(not tested)
RNFetchBlobFS.java
RNFetchBlob.java
What do you think @phodal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your change is make sense.
Actually, I don't have to many experience on Android development. This PR just want to mention people that here was a problem. And, I search google for this PR, it fixed my issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it will fix the NullPointerException. Do you plan to update the PR then or want me to test my stuff on Android and make new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And one concern is that
getSDCardDir()
andgetSDCardApplicationDir()
methods doesn't fit toRNFetchBlob
class, but the maintainer must put two cents to it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree with @chrusart change. @phodal Please make the suggested change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sivakumar-cf In my option , i think @chrusart can create another PR, and I will closed this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make a PR, wip :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #619 created.