Skip to main content
Participant
July 6, 2011
Question

AIR for android Sensors

  • July 6, 2011
  • 1 reply
  • 1960 views

Hi all,

I am developing in AS3 AIR for Android in the flash cs5 IDE.

I want to develop an app that on click logs the users lat, lon, elevation, angle, and direction the phone's camera is pointing.

I know that the there are accelerometer and geolocation sensors in flash.sensors, but i am unclear as to if the accelerometer and geolocation can give me all the data i need.  I know i can the lat and lon with geolocation.. i don't know how ever really how to interpret the data of the accelerometer, let alone how to determine the direction (n,e,w,s etc..) of the phone..

also, i am not sure i am running the most up to date AIR for Android extension but my extension manager doesn't seem to prompt me for an update..

Erik

This topic has been closed for replies.

1 reply

Chris W. Griffith
Community Expert
Community Expert
July 8, 2011

The extension will not be updated. In fact, it is no longer available from adobe.com. To you the latest version of AIR for mobile, you are going to have to upgrade to CS5.5, or jump through some hoops to compile your apks.

As for the sensor data, the compass heading and elevation data points are currently not available.

Chris Griffith

July 8, 2011

You would not get the heading data, but altitude should return the correct value on Android.

Through Accelerometer, you would get the accelration in x, y and z direction. You cannot determine n,e,s,w through accelrometer. At the simplest you can make a maze ball, shake detector, and similar kind of applications.

Thanks,

Meet

Participant
July 8, 2011

Well i can get half of what i want done with lat, lon, and altitude form

geolocation and the x and y axis from the accelerometer.. But i desperately

need to know which way the phone is facing.. god how frustrating.. there

must be a way.. can someone explain to me the z axis? I am tracing it in a

text field and can make sense of the x and y but not sure what plain the z

axis is actually working on and why it appears to give off much different

number sizes than the x and y.. also if anyone can give me any idea how i

may cheat a little and fake the compass that would kick ass..

Erik