Java tutorial
//package com.java2s; //License from project: Apache License import android.net.Uri; public class Main { /** * Convert a String to an Android Uri (Not URI) * @param path String path to convert * @return android.net.Uri */ public static android.net.Uri convertStringToAndroidUri(String path) { try { android.net.Uri toReturn = Uri.parse(path); return toReturn; } catch (Exception e) { return null; } } }