Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherdro authored Nov 24, 2017
2 parents d2400dc + 56a6c32 commit 53ef188
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ buildscript {
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
minSdkVersion 16
Expand All @@ -33,5 +33,5 @@ repositories {


dependencies {
compile 'com.facebook.react:react-native:0.20.+'
compile 'com.facebook.react:react-native:+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ public void convert(final ReadableMap options, final Promise promise) {
}

if (options.hasKey("directory") && options.getString("directory").equals("docs")) {
File path = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DOCUMENTS);
String state = Environment.getExternalStorageState();
File path = (Environment.MEDIA_MOUNTED.equals(state)) ?
new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DOCUMENTS)
: new File(mReactContext.getFilesDir(), Environment.DIRECTORY_DOCUMENTS);

if (!path.exists()) path.mkdir();
destinationFile = new File(path, fileName + ".pdf");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

public class RNHTMLtoPDFPackage implements ReactPackage {

@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-html-to-pdf",
"version": "0.4.0",
"version": "0.5.0",
"scripts": {
"start": "node_modules/react-native/packager/packager.sh"
},
Expand Down

0 comments on commit 53ef188

Please sign in to comment.