Skip to content

Commit 349fd0b

Browse files
authored
Condition to replace deprecated function at sdk 30 (#242)
* condition to replace deprecated function at sdk 30 * remove deprecated function
1 parent d47e3b4 commit 349fd0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/christopherdro/htmltopdf/RNHTMLtoPDFModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void convert(final ReadableMap options, final Promise promise) {
6565
if (options.hasKey(DIRECTORY)) {
6666
String state = Environment.getExternalStorageState();
6767
File path = (Environment.MEDIA_MOUNTED.equals(state)) ?
68-
new File(Environment.getExternalStorageDirectory(), options.getString(DIRECTORY)) :
68+
new File(mReactContext.getExternalFilesDir(null), options.getString(DIRECTORY)) :
6969
new File(mReactContext.getFilesDir(), options.getString(DIRECTORY));
7070

7171
if (!path.exists()) {

0 commit comments

Comments
 (0)