question about sensor, orientationListener and light sensor

by birdy » Tue, 31 Mar 2009 03:10:52 GMT


Sponsored Links
 Hi all:

I studying set rotation by sensor now. I modify
mCurrentAppOrientation from SCREEN_ORIENTATION_UNSPECIFIED to
SCREEN_ORIENTATION_SENSOR. So OrientationListenerwill be enabled
at initial time. When enable mOrientationListener, sensorManager
should register a listener by registerListener and retuen true. But it
return false. I traced the code in SensorManager.java and found I do
not have a sensorList.
There are some questions:
1.How can I build up a sensor list (or I should ask : How can I init
SensorManager or SensorService)?
2.When enable mOrientationListener, there is a parameter :
SENSOR_ACCELEROMETER , is this parameter used for rotation detector?
What functin is SENSOR_ORIENTATION used for?.
3.Does android support SENSOR_LIGHT? If I want add light sensor, how
should I do?

Thanks a lot
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Will there be any updates on audio encoding for audio caputring in later versions of the SDK?

Hi!

The Audio encoding that is included in android is not filling my
needs. It let you record audio of poor quality compare to the quality
that JME offers. Will there be any upgrades on this in the next SDK
release?

AMR today in android let's you record audio in 8 khz and I think that
is not good enough.
But, however, this is maybe just in the emulator, in cell phones maybe
it will be possible to record audio in better quality depending on the
hardware? Does anybody know?

thx
--~--~---------~--~----~------------~-------~--~----~

2. Problem when running SoundRecordingAPISample of Megha

I have downloaded this project, and try running it in Android
Emulator.
When i click on the StopRecording Button, an alert appears :" process
com.android.samples.audio has stopped unexpectedly ".
I wonder there is a problem in this project.
Can someone help me to fix that?

Thanks,

--~--~---------~--~----~------------~-------~--~----~

3. Code signing / App shops

4. How to set Gallery align property?

5. Hello Guys!!! I've got a really stupid Question!!

6. how to learn content type of a media content uri at run time?

7. List background style