Is it possible to receive accelerometer data in background with AIR? (similar to Nike+ on iOS)
I read that it’s possible with Objective-C if we use “Core Motion Framework” and “UIBackgroundModes=location”. What about Air?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From what I’ve seen it appears my application goes completely idle when you navigate away to another application/screen. From what I’m reading here it doesn’t appear to be possible to keep getting info about the accelerometer.
http://blogs.adobe.com/airodynamics/2012/05/04/air-ios-background-behavior/
Hmm k did a bit more digging around to verify if you could do this with a native extension assuming the built in Accelerometer class doesn’t provide the necessary functionality. Apparently the Core Motion framework way of accessing the Accelerometer does allow it to continue to be “polled” in the background:
How Nike+ GPS on iPhone receives accelerometer updates in the background?
Since I own exactly 0 iOS devices I can’t really test this one for you but would be interested to hear how it works out, best of luck.