It is look like you are talking about implementation in the platform, so
this should be posted on android-platform.  Also your message is really
really hard to understand, so if you do repost there some context about you
are talking about would help a lot. :)

On Mon, Mar 30, 2009 at 5:29 AM, birdy <birdy.f...@gmail.com> wrote:

>
> Hi all:
>
> when I study in rotation, I think we can use sensor to setRotation if
> we set  mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR.
>
> 1.Do I think correct for mCurrentAppOrientation?
>
> I try to modify mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR then updateOrientationListener
> () will enable mOrientationListener.
> In the enable function,the second parameter is SENSOR_ACCELEROMETER.
>
> 2.Is type:SENSOR_ACCELEROMETER correct for setRotation ?
> 3.What is type: TYPE_ORIENTATION use for?
>
> enable function in OrientationListener.java will call
> registerListener, and registerListener call registerLegacyListener.In
> registerLegacyListener call getDefaultSensor and alwaye return null.
> So the sensor is null. Maybe because sensorlist is empty. There are
> some comment as below :
>                                if (sensor != null)
>               // If we don't already have one, create a
> LegacyListener
>                // to wrap this listener and process the events as
>                // they are expected by legacy apps.
> I try to modify if (sensor != null) to if (sensor == null) , the
> emulator will reboot again and again.
> 4.How can I init sensor (or sensormanager....) to make a sensorlist?
> 5.Is there any sample code for init sensor (or sensormanager....)?
> 6.Does android have support Hi all:
>
> when I study in rotation, I think we can use sensor to setRotation if
> we set  mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR.
>
> 1.Do I think correct for mCurrentAppOrientation?
>
>
>
> I try to modify mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR then updateOrientationListener
> () will enable mOrientationListener.
> In the enable function,the second parameter is SENSOR_ACCELEROMETER.
>
> 2.Is type:SENSOR_ACCELEROMETER correct for setRotation ?
> 3.What is type: TYPE_ORIENTATION use for?
>
> enable function in OrientationListener.java will call
> registerListener, and registerListener call registerLegacyListener.In
> registerLegacyListener call getDefaultSensor and alwaye return null.
> So the sensor is null. Maybe because sensorlist is empty. There are
> some comment as below :
>                                if (sensor != null)
>               // If we don't already have one, create a
> LegacyListener
>                // to wrap this listener and process the events as
>                // they are expected by legacy apps.
> I try to modify if (sensor != null) to if (sensor == null) , the
> emulator will reboot again and again.
> 4.How can I init sensor (or sensormanager....) to make a sensorlist?
> 5.Is there any sample code for init sensor (or sensormanager....)?
> 6.Does android have support type:Hi all:
>
> when I study in rotation, I think we can use sensor to setRotation if
> we set  mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR.
>
> 1.Do I think correct for mCurrentAppOrientation?
>
>
>
> I try to modify mCurrentAppOrientation =
> ActivityInfo.SCREEN_ORIENTATION_SENSOR then updateOrientationListener
> () will enable mOrientationListener.
> In the enable function,the second parameter is SENSOR_ACCELEROMETER.
>
> 2.Is type:SENSOR_ACCELEROMETER correct for setRotation ?
> 3.What is type: TYPE_ORIENTATION use for?
>
> enable function in OrientationListener.java will call
> registerListener, and registerListener call registerLegacyListener.In
> registerLegacyListener call getDefaultSensor and alwaye return null.
> So the sensor is null. Maybe because sensorlist is empty. There are
> some comment as below :
>                                if (sensor != null)
>               // If we don't already have one, create a
> LegacyListener
>                // to wrap this listener and process the events as
>                // they are expected by legacy apps.
> I try to modify if (sensor != null) to if (sensor == null) , the
> emulator will reboot again and again.
> 4.How can I init sensor (or sensormanager....) to make a sensorlist?
> 5.Is there any sample code for init sensor (or sensormanager....)?
>
> 6.Does andorid have support sensor type:SENSOR_LIGHT?
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to