浏览代码

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

Gaëtan Renaudeau 9 年前
父节点
当前提交
a85cf9629a
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java

+ 1
- 2
android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java 查看文件

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();