Skip to content

Instantly share code, notes, and snippets.

@initishbhatt
Created April 12, 2018 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save initishbhatt/8136c25a11de790d3a24ca23b59bee80 to your computer and use it in GitHub Desktop.
Save initishbhatt/8136c25a11de790d3a24ca23b59bee80 to your computer and use it in GitHub Desktop.
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 {
@JvmStatic
fun testMethod(numOne: Int, numTwo: Int) = numOne + numTwo
// 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