Created
November 15, 2018 11:02
-
-
Save mirceanis/a668414fbd137dc48f61a797301deade to your computer and use it in GitHub Desktop.
pass file across JNI boundary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val target = File(context.getFilesDir(), "my-file") | |
val fd = ParcelFileDescriptor.open(target, ParcelFileDescriptor.MODE_READ_WRITE).detachFd() | |
//fd is an int that's ok to be passed to native code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment