*Chumki*, http://www.vogella.com/articles/AndroidSensor/article.html
Check this code might help you.Instead of doing actions on compass you switch off and on your phone light. *Thanks* Fahad Mullaji On Thu, Aug 2, 2012 at 2:46 PM, chumki ghosh <[email protected]>wrote: > Hello All, > > I want to make a sample application on phone-gap android.I want to use > accelerometer. Now i able to get values of X,Y,Z axis. But i want to > implement like light sensor on it.Like when user recieve any call and bring > the device front of ear den light gone ON and when device lies flat then > light gone OFF. > It means when when device lies flat x axis value is positive. Can anyone > please help me how to implement light sensor on it. > > Thanks in Advance!!!!!!!!!!!!!!!!!!!!!!1 > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Regards Fahad Mullaji -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

