Browse Source

Fix the Android implementation to return a file path, not an Uri path

Gaëtan Renaudeau 8 years ago
parent
commit
a85cf9629a

+ 1
- 2
android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java View File

67
             if ("file".equals(result)) {
67
             if ("file".equals(result)) {
68
                 os = new FileOutputStream(output);
68
                 os = new FileOutputStream(output);
69
                 captureView(view, os);
69
                 captureView(view, os);
70
-                String uri = Uri.fromFile(output).toString();
71
-                promise.resolve(uri);
70
+                promise.resolve(output.getAbsolutePath());
72
             }
71
             }
73
             else if ("base64".equals(result)) {
72
             else if ("base64".equals(result)) {
74
                 os = new ByteArrayOutputStream();
73
                 os = new ByteArrayOutputStream();