0

I am trying to upload the downloaded pdf file in Android 11. In that, I am trying to get a path for the pdf file, cursor move to next() method returns false android 11.

The downloaded pdf file gives us Uri as, content://com.android.providers.media.documents/document/pdffilename:33A

I am facing an issue while trying to access the path for this URI, I need help with this one.

General Grievance
  • 4,259
  • 21
  • 28
  • 43
  • There is no path, as this does not have to point to a file accessible to you on a local filesystem. Use the `Uri` directly. For example, if you intend to use OkHttp or Retrofit to upload the PDF content, you can use an `InputStreamRequestBody` that uses a `Uri`: https://stackoverflow.com/a/56308643/115145 – CommonsWare Dec 17 '21 at 13:56

0 Answers0