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 changed files with 1 additions and 2 deletions
  1. 1
    2
      android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java

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

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