RTEditor/src/main/java/com/onegravity/rteditor/media/MediaUtils.java
public static Uri createFileUri(String path) {
        if (path.startsWith("file://")) {
            return Uri.parse(path);
        }
        return Uri.fromFile(new File(path));
    }
public static Uri createFileUri(String path) {
        if (path.startsWith("file://")) {
            return Uri.parse(path);
        }
        return Uri.fromFile(new File(path));
    }
public static Uri createFileUri ( String path ) { if ( path . startsWith ( "file://" ) ) { return Uri . parse ( path ) ; } return Uri . fromFile ( new File ( path ) ) ; }
Creates a file Uri for a file defined by its absolute path.
The method can handle the case of an absolute path (e.g. /data/data....)
and a Uri path containing the file:// scheme (e.g. file:///data/data...)
Creates a file Uri for a file defined by its absolute path . The method can handle the case of an absolute path ( e . g . / data / data .... ) and a Uri path containing the file : // scheme ( e . g . file : /// data / data ... )