How to play with devices like accelerometer and camera using C/C++?
<p>As you can see in architecture diagram below android platform has been built using different layers.</p>

<ul>
<li><code>Application</code> are developed in <code>Java</code></li>
<li><code>Application Framework</code> is written using <code>Java</code> (according to my understanding)</li>
<li><code>Libraries</code> are in <code>C/C++</code></li>
</ul>

<p><img src="http://i.stack.imgur.com/XjjzL.jpg" alt="enter image description here"></p>

<p>For some insane reason I have to play/deal with devices like <code>accelerometer</code>, <code>compass</code> and <code>camera</code> using <code>C/C++</code> which means directly accessing them in 3rd layer i.e. <code>Libraries</code>. According to my understanding the <code>Application Framework</code> itself would be consuming <code>Libraries</code> for accessing these devices and then providing <code>APIs</code> for <code>Applications</code>. </p>

<p>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 <code>C/C++</code> code or in other words how to play with these devices directly from <code>Libraries</code> layer.</p>

<p>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.</p>
