覆盖 Android 设备中的 USB 或电源线连接声音
有什么办法可以
覆盖 USB 线或电源线连接到 Android 设备时发出的默认声音?
我正在寻找一种方法来用我自己的声音替换默认系统声音,甚至完全禁用声音。
我对android开发人员参考
做了一些挖掘,发现意图“android.intent.action.ACTION_POWER_CONNECTED”
可以在<广播接收器来处理设备的电源连接状态。但我无法中止该广播(如果我不想播放默认声音),因为它是无序广播。
还有其他出路吗?
任何帮助表示赞赏。
谢谢。
Is there any way to
override the default sound that is made when an usb cable or power cable is connected to an android device ?
I am looking for a way to replace that default system sound with one of my own or even disable the sound completely.
I did some digging into the android developer reference
and found that the intent "android.intent.action.ACTION_POWER_CONNECTED"
can be used in a broadcast receiver to handle the power connected state of the device. But I cannot abort that broadcast (in case I do not want to play the default sound) as it is a non-ordered broadcast.
Is there any other way out around this ?
Any help is appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论