Issue
I am confused with Jni layer, NDk LAYER and the C/C++ source code components LAYER in the Android system.
When writing feature on Android based platform, introducing new custom components:
Can I refer any component written in c/C++ as NDK component ?
What is jni, a file which helps loading c/C++ shared objects ?
I have refered below link: It talks about how to use it but not exactly clarifies the naming convention used in Android platform. https://developer.android.com/training/articles/perf-jni.html
Can someone please clarify the distinction between JNI,NDK and c/c++components?
Solution
Here's a worlflow.
You have a class named NativeGoodAlgorithm written in C/C++.
Write a wrapper for NativeGoodAlgorithm called NativeGoodAlgorithmInterface(JNI).
Write a Android.mk that links your native code and wrapper to generate a library(.so).
In Android, you load the generated library and write a Java class named GoodAlgorithm.
Then you call GoodAlgorithm wherever you want.
Answered By - Moved
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.