4

I am building a location based app. But, when my app is in the background, location updates continue and it drains the battery. So I chose to use Core Motion to detect if user is in Automotive mode, and only use Core Location if that is the case, and not update locations otherwise. But the Core Motion chip sleeps in background mode and I don't get data.

How can I keep the Core Motion chip awake while my app is in the background?

Desert Rose
  • 3,376
  • 1
  • 30
  • 36
  • Duplicate question see: http://stackoverflow.com/questions/20083032/coremotion-updates-in-background-state – Jeshua Lacock Feb 09 '16 at 07:25
  • Also here: http://stackoverflow.com/questions/20766139/iphone-collecting-coremotion-data-in-the-background-longer-than-10-mins – Jeshua Lacock Feb 09 '16 at 07:26
  • And: http://stackoverflow.com/questions/21380806/receive-accelerometer-updates-in-background-using-coremotion-framework – Jeshua Lacock Feb 09 '16 at 07:27
  • 3
    @JeshuaLacock I have mentioned in question i want to use core location only after getting data from core motion not simultaneously.Also with VOIP hack app gets rejected and audio hack has issues if we play external audio in the phone. – Desert Rose Feb 09 '16 at 09:51
  • You don't mention any VOIP hack in your question. Have you read those other threads? Because they are discussing exactly what you are asking how to do. – Jeshua Lacock Feb 09 '16 at 23:33
  • @JeshuaLacock Yes I posted this question after searching over internet whole day. – Desert Rose Feb 10 '16 at 05:49
  • @DesertRose Did you get a closure on this. I need to do the part of detecting motion in background. TIA. – Dibzmania Mar 25 '19 at 04:10
  • @Dibzmania NO Closure. – Desert Rose Mar 28 '19 at 00:01

0 Answers0