1

If I have a ParcelFileDescriptor that is being passed to me and I need to call an API that requires a filePathString, I don't see how to map this? Short of creating a temp file and then passing that as a path is there a cleaner way of doing this?

justdan0227
  • 1,374
  • 18
  • 48

1 Answers1

3

Nope, you're on the right track. Create a temp file and copy the data into it. That's as clean as it gets.

Bear in mind that, despite the name, a ParcelFileDescriptor may have nothing to do with an actual file on the filesystem, let alone one that you have direct filesystem access to.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491