Java tutorial
//package com.java2s; /* * This is the source code of DMPLayer for Android v. 1.0.0. * You should have received a copy of the license in this archive (see LICENSE). * Copyright @Dibakar_Mistry, 2015. */ import android.net.Uri; import java.io.File; public class Main { public static Uri getUriFromPath(final String path) { File file = new File(path); return Uri.fromFile(file); } }