Ability to read hardware

We should be able to read the data from our iPad’s buttons. For instance: if the home button is pressed, pause the game.

@niorg2606 that’s not something which is possible in the iOS SDK. The home button will always suspend the running app, there is nothing an app can do to prevent that.

But you do have the appWillEnterBackground method that gives you a chance to do last minute tasks. If Codea offered a hook into that method it’d be really useful for things like pausing the physics simulation.

@yojimbo2000 it’s supposed to pause that automatically. But I agree that a hook would be very useful regardless.

Yeah I don’t think the physics gets paused reliably

A hook for appWillEnterBackground would be useful, but what about the volume buttons? Is it possible to hook into those?

@niorg2606 The volume buttons will work but apple doesn’t like people using the buttons for non standard things
“2.5.9 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, or other native user interface elements or behaviors will be rejected.”
Mabe a set volume and read volume will be allowed because Codea isn’t doing anything but probably not a “button pressed” event