1

I want to do some action in my app when the user presses the power button two times while my app is already in background/closed. How can I trigger the action of power button for it inside my app? or if I can add any observer in my app for such action? Is it possible to get this functionality in iOS?

Thanks for help

Monika
  • 23
  • 5

1 Answers1

2

It is not possible to observe exactly on touching any button on the device. It is the same with volume buttons, you can observe the effect (volume went up or down) but not the pushing button in fact (the volume changed could be triggered in other way).

Sum up: This is not possible, do not go for it.

Community
  • 1
  • 1
Julian
  • 9,299
  • 5
  • 48
  • 65