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