How is it possible to access files which are generated from a DocumentFile in Android KitKat/Lollipop in Native JNI Code, so I can use fopen, fread, etc. I\'m particular asking
You can use file descriptors:
ParcelFileDescriptor filePfd;
DocumentFile file;
filePfd = getContentResolver().openFileDescriptor(file.getUri(), "w");
int fd = filePfd.getFd();
This int fd
can be passed to JNI and used as usual C++ file descriptor:
FILE* file = NULL;
file = fdopen(fd, "r+b");
And you need permission to access to file or directory on SD-card