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 23 in Suggestions Posts: 68

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

Comments

  • SimeonSimeon Admin Mod
    Posts: 4,356

    @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: 1,991
    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: 4,356

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

  • Posts: 1,991
    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.