问题描述
正如你可以在下面的Android平台架构示意图看到使用不同的层已建成。
-
应用程序
都制定了的Java
-
应用程序框架
是用写的Java
(根据我的理解) -
库
在C / C ++
对于一些疯狂的原因,我要玩/处理像加速
,指南针
和<$ C $设备C>相机使用 C / C ++
这意味着直接访问它们在第三层即库
。根据我的理解应用程序框架
本身将消耗库
用于访问这些设备,然后提供原料药
为应用程序
。
我要寻找的任何文档/教程/演示,可以帮助我在这方面,即如何访问和使用这些设备,如摄像头,加速计和指南针从 C / C ++
code或者换句话说,如何与这些设备直接从库
层。
我最后的选择是获取Android源$ C $ c和深入挖掘它,找出我在找什么,但我想在一个文档/演示/教程/任何形式的一些简单的方法,可以使这一点难不倒我。
您不知道。您从Java code访问它们。重新组织你的C / C ++ code来支持你的Java code。
As you can see in architecture diagram below android platform has been built using different layers.
Application
are developed inJava
Application Framework
is written usingJava
(according to my understanding)Libraries
are inC/C++
For some insane reason I have to play/deal with devices like accelerometer
, compass
and camera
using C/C++
which means directly accessing them in 3rd layer i.e. Libraries
. According to my understanding the Application Framework
itself would be consuming Libraries
for accessing these devices and then providing APIs
for Applications
.
I am looking for any documentation/tutorials/demo which can help me in this regard i.e how to access and use these devices like camera, accelerometer and compass from C/C++
code or in other words how to play with these devices directly from Libraries
layer.
My last option would be to get the android source code and dig deep into it to find out what I am looking for but I would like some easy way in form of a documentation/demo/tutorial/anything that can make this a bit easy for me.
You don't. You access them from Java code. Reorganize your C/C++ code to support your Java code.
这篇关于如何与像加速度传感器和摄像机使用C / C ++设备播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!