I have c/c++
source code that was built as shared library using AOSP environment
. (Using mm command). That has 4 function: add
, sub
, multiple
, divide
. Now, I want to call these function from Android Application that uses UI. It means that I want to use native library in Android Application. So my question is do I call these functions directly from Android Application? and if so, How I can do that ?
Thank A lot.
Android Applications are written in Java, or Kotlin, or whatever language that compiles to DEX (the bytecode that runs in Android JVM). You need JNI layer to connect to your C++ library. Hopefully, your language provides native methods that are implemented via JNI.