Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Screen Always On, PowerManager, WakeLock, Backlight

Screen Always On, PowerManager, WakeLock, Backlight

Quickly share your Android Code Snippets here...

Re: Screen Always On, PowerManager, WakeLock, Backlight

Postby zuerst » Thu Nov 03, 2011 9:12 am

I have a Galaxy Tab 1000.I am trying to write a code, that will identify ANY movement.I have version 2.2 on the phone.This is the oncreate code.
OnCreate()
mySensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mySensorManager.registerListener(mySensorEventListener, mySensorManager
.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
SensorManager.SENSOR_DELAY_NORMAL); //

This is the sensor onsensorchanged implementation (very simple I think) but not working
if (event.sensor.getType() == SensorManager.SENSOR_ACCELEROMETER) // Do WORK
The event.sensor.getType() returns 1
If I do: getSensorList(Sensor.TYPE_ALL); I get sensors compass, compass, BMA150 (accel), temp, magnet, proximity, light and Gyro.

(weird - I thought it's only up in 3.0)

Please advise, how can I get motion detection on the phone.
thanks
zuerst
Freshman
Freshman
 
Posts: 4
Joined: Wed Nov 02, 2011 8:06 am

Top
Previous

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 7 guests