質問

I'm giving the first steps in android programing world. This is a beginner question.

How is done, the process of using libraries writen in c or c++ to manipulate for example the camera or speaker in one Android App?

We use Hardware services that permit accessing this components like camera. This Hardware services make native calls (JNI)? Is this correct?

The Dalvik VM executes a dex file. Does this dex file contains all this intrutions translated to machine code?

I'm a little confused

役に立ちましたか?

解決

As mention in Android Architecture Diagram the android has most of libraries that using java Native Interface(JNI) to be able to call the native(c/c++) in Linux kernel so when you write code to call the camera the your java code call some function in libraries section called media framework that deal with the hardware and open camera for you and manipulating with it , and here the some hierarchy for explaining the idea :

Android Application | Android Application | Java Native Interface | C/C++ Native Libraries

feed me back in any component is not obvious for you

他のヒント

If you have C / C++ libraries, you may be able to use them with the NDK:

http://developer.android.com/tools/sdk/ndk/index.html

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top