What is a reliable way to get file descriptor in android to pass it to native code


I want to read some files in native code with file descriptors.
I get FileDescriptor using the getFD() method on FileInputStream

but I discovered that I can't just fetch the fd field in JNI because of this. Android API code

They changed the fd field to descriptor
I don't know since when did they make this change. I want a reliable way to get the file descriptor across different android versions.

0
Jul 22 at 7:11 PM
User AvatarAmmar
#java#android#file-descriptor

No answer found for this question yet.