Question

I'm bulding an application with a Nokia S40 Full Touch: A simple app that has a ball in the center of screen, when you shake it (Up/Down/Left/Right) you move the ball in the direction you want.

I found that javax.microedition.sensor.Data is what I think I need. But I cannot find more information on what to do next.

What will the result of getDoubleValues()/getIntValues() present? Can I recognize the direction from these number?

Was it helpful?

Solution

The API is called JSR256. Googling for "JSR256 example" will give you what you need, for example this one: http://developer.sonymobile.com/downloads/code-example-module/utilize-the-w910-accelerometer-in-j2me-using-jsr-256-the-bouncing-ball-game/

JSR256 specification: http://jcp.org/en/jsr/detail?id=256

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top