In my application I really need to set the rate of events of the accelerometer... I went to check in the source code and there no place for custom values, despite the existence of the information in documentation...
There is a way to set a custom rate in sensor events? Thanks in advance Joni On 18 Maio, 00:13, Mark Murphy <mmur...@commonsware.com> wrote: > Please use one of the documented constants for the third parameter. > > > > > > > > > > On Tue, May 17, 2011 at 6:59 PM, bob <b...@coolgroups.com> wrote: > > I'm having trouble with this method: > > > public boolean registerListener (SensorEventListener listener, Sensor > > sensor, int rate) > > Since: API Level 3 > > > Registers a SensorEventListener for the given sensor. > > Parameters > > listener A SensorEventListener object. > > sensor The Sensor to register to. > > rate The rate sensor events are delivered at. This is only a hint to > > the system. Events may be received faster or slower than the specified > > rate. Usually events are received faster. The value must be one of > > SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or > > SENSOR_DELAY_FASTEST or, the desired delay between events in > > microsecond. > > > I passed in 200,000 as the third parameter to tell it to notify me 5 > > times a second. However, it basically would not notify me at all > > after I did that. Anyone know what the deal is with this? > > > -- > > 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 > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training -- 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