Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { private static final String FILE_PREFIX = "file://"; public static String getFileUrl(String filePath) { if (!TextUtils.isEmpty(filePath)) { return FILE_PREFIX + filePath; } return ""; } }