Tracking Accelerometer in Background (iOS)?

Is it possible, while either the device is locked or the app is still running in the background on iOS, to measure accelerometer values and then have the app process this values while still running in the background? Thanks.

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Unfortunately, no. It's not just accelerometer values, either. Try anything: have a timer that changes an integer attribute every second and then background the app for 10 seconds and see if the value has changed.

    If the value did change -- and by extension if the accelerometer did work -- it would negate the ability of an app to pause when backgrounded. You'd have to always code in a pause whenever the player decided to press the home button. And since we don't have access to home button events in GS, our apps would be ruined by people complaining that our games don't pause when they switch apps.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

Sign In or Register to comment.