haha! I reslove it!!!
ellipsoidmob...@googlemai-l.com,Thanks very much!
On 3月27日, 下午6时28分, Markus Junginger mar...@junginger.biz wrote:
On Mar 27, 11:11 am, Lukasz M lukasz.mosd...@gmail.com wrote: I had the
same problem.
I fixed it using a static sensor-reading object. Therefore while
I can confirm this issue. Since I switched from portrait to landscape,
the sensor values are messed up *sometimes* (swapped) and then I need
to restart the app!
Did we miss something or are the sensor values buggy in landscape
mode?
--~--~-~--~~~---~--~~
You
Reading the bold docs in upper case is always good. :) I did not
remember this info, and it's working as expected. Thanks!
BUT: I use a *fixed* landscape orientation, so the orientation should
not change. On the screen it does not when opening the keyboard, but
if the sensor does it seems more
I had the same problem.
I fixed it using a static sensor-reading object. Therefore while
changing between activities sensors didnt swap. When the sensor-
reading object was created every time a proper activity was started
sensors did some pretty weird stuff.
On Mar 27, 10:52 am, Markus Junginger
On Mar 27, 11:11 am, Lukasz M lukasz.mosd...@gmail.com wrote:
I had the same problem.
I fixed it using a static sensor-reading object. Therefore while
changing between activities sensors didnt swap.
But what happens when you start the app with the keyboard open?
Wouldn't you have swapped
This is intentional - the values in the 1st three elements of the
array depend on the orientation. If you want values that don't change,
then use elements 3, 4, 5. It's noted in the onsensorchanged
documentation as below:
IMPORTANT NOTE: The axis are swapped when the device's screen
orientation
SensorManager mSensorManager ;
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
mSensorManager.registerListener(grGameRun,
SensorManager.SENSOR_ACCELEROMETER |
SensorManager.SENSOR_MAGNETIC_FIELD |
7 matches
Mail list logo