1

是否可以使用 AIR 在后台接收加速度计数据?(类似于 iOS 上的 Nike+)

我读到如果我们使用“Core Motion Framework”和“UIBackgroundModes=location”,Objective-C 是可能的。空气呢?

谢谢

4

1 回答 1

1

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.

于 2013-01-08T21:59:54.273 回答