public static Uri getUri ( Context context , File file ) { if ( file != null ) { return FileProvider . getUriForFile ( context , FILE_PROVIDER_AUTHORITY , file ) ; //Uri.fromFile(file); } return null ; }
Convert File into Uri .