Receive notification when a button is pressed on the iPhone when the screen is off

I plan to create an application for saving life, and I need to integrate with any physical buttons on the iPhone (Home, volume, lock). Is this possible programmatically when the screen is off (on a device not damaged by the prison)?

Thanks in advance!

+3
source share
4 answers

I like your idea, but I don’t think it will be available on a non-jailbroken device. @Andrews answer may work if your application was triggered by a play / pause combination that follows and back, but would require that your application always meet the device audio requirements, which are possible only between when the user closes your application and starts everything, that controls the sound of the device. (which is probably not so long)

, iOS- Life Alert, , 911 , , .. (, "" - , , , , )

- - , , , Apple. , .

, , , , iOS. !

+2

-, , Apple .

+1

, .

, MPMusicPlayerController, MPMusicPlayerControllerVolumeDidChangeNotification, . , , .

+1

. Apple .

0

All Articles