Archive for category JNI
See the accelerometer in action on the N95
Posted by Stephen Downey in Accelerometer, c++, java, JNI, N95, Nokia, rotateme on November 1, 2007
Just found out something cool about the N95; it turns out that it has a Accelerometer (Level Sensor). It is used by the camera in the phone to rotate pictures taken in portrait mode. It makes you wonder why Nokia did not use this to give an auto rotate to the phones screen, similar to the feature available on the IPhone? It looks like there is someone developing this for the phone at the moment. It is called rotateme and should be out later this month. Check out the developers site for more information.
Nokia have released a demo application to show the accelerometer in action. Its a pretty simple application but it shows the power of what can be done. At first I didn’t believe it was possible but check out this video below to see it in action.
They have also released the source code for the game so you can see how it is done. The game uses the N95 RD Accelerometer Plug-in package to hook into the accelerometer on the N95. According to the research group that developed the this:
In a later N95 firmware release you should be able to access the raw accelerometer data by using the official sensor plug-in downloadable from Forum Nokia (Sensor Plug-in for 60 3rd Edition).
I can think of lots of game applications that could use this that I would love to write. Unfortunately my C++ skills are very limited. I wonder if I could hook into it from a JAVA app using JNI?