how to distinguish on iOS volume button clicked from setting it by a software

后端 未结 2 1431
故里飘歌
故里飘歌 2020-12-22 07:17

Is there any way to distinguish in the iOS app a situation that someone have changed volume by hardware buttons on iPhone/iPad from the situation that it has been done by so

相关标签:
2条回答
  • 2020-12-22 07:54

    You might want to have a look at the private API. rpetrich did some research again.. :) click here

    But you need to know that this is not really a good idea because apple probably will reject your app when accessing private apis.

    0 讨论(0)
  • 2020-12-22 08:07

    After a long search I came up with this:

    There is no way to detect hardware button been pressed (so far iOS 7). You can only be informed with the result - volume changed. It means that the only solution will be to properly handle situation when the volume change is triggered by some UI component.

    0 讨论(0)
提交回复
热议问题