【发布时间】:2019-10-09 04:58:10
【问题描述】:
我有一个以编程方式更改流音量的用例,但在较新的 android 音量上,将音量提高到某个限制以上(根据我的观察,60% 对应于大多数手机上的第 9 步)会导致警告对话框:
Listening at high volume for a long time may damage your hearing. Tap OK to allow the volume
to be increased above safe levels
Cancel OK
我在 android 开发者门户中找不到任何关于此的文档,我只能找到一些引用欧洲法规的随机文章,例如 one:
According to regulations set by the European Committee for Electrotechnical Standarisation (CENELEC), all electronic devices capable of media playback sold after February 2013 must have a default output volume level of a maximum 85 dB. Users can choose to override the warning to increase the volume to a maximum of 100 dB, but in doing so the warning must re-appear after 20 hours of music playback.
所以我需要可靠地确定这个数字是多少,所以我不会导致显示此对话框的音量更改,但我也不想只使用第 9 步作为最大音量,并且,然后发现它不适合另一部手机。 android API 是否在任何地方公开最大安全流音量?如果不是,那么他们是否至少记录了不同手机对应的步骤号?
谢谢!
【问题讨论】:
标签: android android-audiomanager