Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collecting accelerometer data in background

I am developing an iOS 4 + application, which can transmit accelerometry data collected on an iPhone to a server. The app should collect data even when the application enters in background (I want to know the person’s movements).

After doing some research on the Internet, I learned that the app is killed 10 minutes after being closed, and it is not possible to implement it the same way as on Android (using services).

Only some tasks can run in background like an audio player, VOIP or geolocation. I read somewhere on the Internet that we can use workarounds for letting the application running in background. It uses the audio player, which plays a mute sound. However, this workaround seems not to be accepted by Apple.

Do you see any solution to my problem?

like image 769
appsofiane Avatar asked Jul 19 '12 07:07

appsofiane


1 Answers

If you register your app to listen to location, and use CoreMotion, you can get accelerometer data in background.

This is duplicate with: How Nike+ GPS on iPhone receives accelerometer updates in the background?

like image 87
Aapo Kyrola Avatar answered Sep 23 '22 07:09

Aapo Kyrola