Skip to content

Instantly share code, notes, and snippets.

@initishbhatt
Last active April 12, 2018 12:23
Show Gist options
  • Save initishbhatt/0f4ffd6d6b490498a7c980c0bb6b25a0 to your computer and use it in GitHub Desktop.
Save initishbhatt/0f4ffd6d6b490498a7c980c0bb6b25a0 to your computer and use it in GitHub Desktop.
Store to encapsulate all the native functions
class NativeStore {
/**
* A native method that is implemented by the 'native-lib' native library,
* which is packaged with this application.
*/
external fun stringFromJNI(): String
companion object {
// Used to load the 'native-lib' library on application startup.
init {
System.loadLibrary("native-lib")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment