There is a class named Uri which extends Object class and implements Parcelable Comparable and method of this class,
public static Uri fromFile (File file)
Creates a Uri from a file. The URI has the form "file://". Encodes path characters with the exception of '/'.Example: "file:///tmp/android.txt". In android to create Uri of a file see this code segment -
// Create a Uri for files on external storage
File externalFile = new File(Environment.getExternalStorageDirectory(), "queryhomeTutorial.pdf");
Uri external = Uri.fromFile(externalFile);