code: @NonNull
      @Override
      public Uri toUri(@NonNull final File file) {
          return FileProvider
                  .getUriForFile(getContext(),
                          getContext().getApplicationContext().getPackageName() + ".provider",
                          file);
      }
docs: Convert the path to a URI for the return intent
  
  @param file either a file or directory
  @return a Uri