Is Accelerometer disabled on app exit or pause by the Play.Date?

This is possibly a question about bad practices! In Lua and C we have to explicitly enable the accelerometer to measure values. If we're good citizens we should be explicitly disabling the accelerometer on pauses and app exits ourselves I assume.

However does the Play.Date enforce this at all? If my prototype game exits or pauses is the accelerometer forced off by the Play.Date? Since I'm using the C API, this is also an indirect question about app crashes. Is the Accelerometer forced off then at all?

No need to worry about crashes at least. Because after a crash te device is restarted.

1 Like

That is a fair point! I'll be a good citizen and handle the kEvents properly, I was just idly curious.

I added the function to turn the accelerometer on and off before we had the hardware pinned down, but it turns out it's not really needed. The accelerometer we wound up with draws so little power you wouldn't be able to measure the difference. Another premature optimization..

1 Like