Thanks for the swift reply Mark.

Hmmm that's a shame, i suppose I could listen for a sensorChanged
event on the accelerometer, then for each other sensor in turn - and
log the time delay between each event. Unsatisfactory as I'd really
like to get the data every nth of a second to do some signal
processing/filtering but that would rely on having a known
frequency... ho hum :(

BTW I was playing with Android Scripting Environment and there is a
python example called sensors.py:


import android
droid = android.Android()
droid.startSensing()
.
.
sensors = droid.readSensors()
print sensors

I wonder what's going on "under the hood" there...?

Thanks again,
B

On Oct 4, 3:52 pm, "Mark Murphy" <[email protected]> wrote:
> > Up until now I have been using SensorEventListener.onSensorChanged
> > (SensorEvent evt) to obtain data values from the on board sensors (G1)
> > whenever a sensor event occurs (snippet below). However, what I really
> > want to be able to do is read the values of all the sensors (i.e.
> > Sensor.TYPE_ORIENTATION, Sensor.TYPE_ACCELEROMETER and
> > Sensor.TYPE_MAGNETIC_FIELD) together at the same instant in time, or
> > near enough as the system will allow.
>
> > I'm probably being thick but does anyone know whether there a way of
> > reading the sensor values directly without having to use/wait for
> > onSensorChanged() ?
>
> Not that I am aware of.
>
> The point of registering for sensor changes is, among other things, to
> turn on that sensor. Not all sensors may be running at all times, since
> their use drains the battery.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to