Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Ability to read hardware

edited February 2017 in Suggestions Posts: 79

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


  • SimeonSimeon Admin Mod
    Posts: 5,782

    @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.

  • Posts: 2,020
    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.
  • SimeonSimeon Admin Mod
    Posts: 5,782

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

  • Posts: 2,020
    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

Sign In or Register to comment.