Last active
April 16, 2020 08:20
-
-
Save turkergoksu/07bef9c86a782150d8dcf9c7913d7de8 to your computer and use it in GitHub Desktop.
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
// ApiKeyLibrary.kt | |
object ApiKeyLibrary { | |
init { | |
System.loadLibrary("api-keys") // ex.. api-keys.cpp | |
} | |
// Name of the function must be same as used in the native code. | |
external fun getMovieDbApiKeyFromJNI(): String | |
} | |
// MainActivity | |
// … | |
val apiKey = ApiKeyLibrary.getMovieDbApiKeyFromJNI() | |
// … |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment