Skip to content

Instantly share code, notes, and snippets.

@AdiD253
Created November 2, 2018 13:09
Show Gist options
  • Save AdiD253/10bf05c85d3d7c2f57062cc85c02423c to your computer and use it in GitHub Desktop.
Save AdiD253/10bf05c85d3d7c2f57062cc85c02423c to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
companion object {
init {
System.loadLibrary("native-lib")
}
}
private external fun secretKey(): String
private val superService by lazy {
SuperService()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
connectToWebservice()
}
private fun connectToWebservice() {
superService.connect(secretKey())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment