public static boolean isLocalFileUri(Uri uri){
  String scheme=uri.getScheme();
  return TextUtils.isEmpty(scheme) || scheme.equals("file");
}

public static boolean isLocalFileUri ( Uri uri ) { String scheme = uri . getScheme ( ) ; return TextUtils . isEmpty ( scheme ) || scheme . equals ( "file" ) ; }
returns true if the uri is a path to a local file or a reference to a local file .
