code: @NonNull
      public static Uri getUri(@NonNull Context context, @NonNull File outPath) {
          Uri uri;
          if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
              uri = Uri.fromFile(outPath);
          } else {
              uri = CameraFileProvider.getUriForFile(context, CameraFileProvider.getProviderName(context), outPath);
          }
          return uri;
      }
docs: Generates an externally accessed URI based on path.
  
  @param context context.
  @param outPath file path.
  @return the uri address of the file.