Hardware Volume Control
I'm trying to figure out what works best for applications that are mostly silent, but sometimes make sound. Such applications can take advantage of volume control on iOS devices and avoid the need to develop NSVolume control widgets, which, in my opinion, are not as convenient as hardware volume control. This approach will be applied to applications such as MapQuest 4 mobile, where you get random audio prompts that work well with other music players (using a sound duck), but are mostly silent. I am wondering how others solve this problem.
I developed a system that works pretty well. In my approach, I request an audio API to determine if other music is playing (iPod, AOL Radio, Pandora, etc.), then it starts an audio session only if no other sound is playing. This links the hardware third-party volume control to the app instead of ringing (for iPhone). A task arises when you go to the background. My approach kills (deactivates) a session in the background only if the application does not use audio. When playing sound, the session is deactivated when playback ends.
The idea behind killing playback is to restore the user's ability to adjust the ringer volume to their liking if my app continues to run in the background.
This question arises because of the problems that I encountered while developing the voice navigation function on the MapQuest 4 mobile device on iOS in 2008-2009. In this application, we wanted the surround speaker switch to constantly monitor the volume of the prompts while the application was running. Later, I realized that I could not control the volume of the call after arriving at my destination and sending the application to the background. This was many years ago, but I believe that the application continues to run in the background, which leads to this problem. This is an interesting case when the user moves, but sends the application to the background, if you continue the audio session? Most likely, the user would like to change the volume of the application or the volume of the call when the application is running in the background?
( ) ( ). , , . .
, , . , . ? , /- ? , ? ? ?