hi, is it possible to to listen to an event with java2me if the resolution of an mobile phone changes through the motion sensor?
for example if i turn the phone about 90 degrees and the phone has an motion sensor.
have you tried the Mobile Sensor API? The API gives access to the motion sensor(s). This might do the trick.
For more information about the API:
On some phones it is possible to read a system property to find out if you are in landscape or portrait mode, but this is a less portable solution.
Depends on the device, and the special APIs it has on it.
Native event calls that the OS might post from a motion sensor may not be visible from JavaME.
If the operator has special hooks into the motion sensor and provides access to it there may be the need to sign your midlet as well.
Now you might be able to do something yourself, by using the MMAPI to capture images from the camera and then do a comparison of the images to determine motion. If the phone auto orientates when capturing the image, you might be able to use the width & height of the captured image to determine a 90deg rotation has occurred.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.