views:

74

answers:

2

Can we also capture the center/HOME button in iphone the same way we can do for android using phonegap?

+1  A: 

No. Not in any "legal" way (that is, not on a non-jailbroken phone).

Toastor
+1  A: 

No, not the way you probably want, as an action button in the app.

The Home button will exit the current app. You can however, capture the app exit event in Objective-C, and send a javascript message to your webpage (since it is a synchronous event, your webpage will get the event). Not for much more than "cleaning" up things.

In iOS 4.0, there are more events to handle (like app going to background when the user double-clicks the Home button).

Shazron