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. Manage groups on G1/ADP1 - Android OS

I will paste a quote from other user, because I have the exact
question:

In gmail I have my contacts sorted by groups, easy enough, on occasion
I need to add a new group or move a contact from one group to another,
which is easy enough using a pc and my gmail account.
However, I cannot seem to add new groups or edit existing groups on my
G1. I can see the groups, I can sort by groups, but I cannot find an
option that will allow me to add or edit any groups.
Does anyone know how this is done on the G1? I
suppose I could use the browser to log on to my gmail account an
change it from there but isn that sort of redundant since I am on my
gmail account using the G1?

Thanks,
C



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

2. Image cropping in SDK 1.1

Hi, I am not able to find any API for cropping images in the latest
android SDK. Can someone please tell me where should I look for. Also
is there a way to use the Pictures application in Android to crop
images i.e. calling that activity from my activity.

Any help would be appreciated.


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

3. R class not created or updating in Eclipe

4. need help in getting screen coordinates of a view

5. Android SDK for 64 bit Linux?

6. g1 version

7. how do i get the center location after a user dragged their center point to another location on a map?