One option with an iOS device if the hardware button fails

If the hardware button fails with an iOS device, one option or workaround is to use the AssistiveTouch feature.  Go to Settings –> General –> Accessibility.  Turn on AssistiveTouch.

ios_assistivetouch

A small icon should appear.  If selected, a new dialog box should appear that includes a “home” option.

ios_assistivetouch_2