BroadcastReceiver TTS 和音量
我有一个启动后台服务的 BroadCastReceiver。该服务使用 TTS 朗读一些文本。由于这一切都是从 BroadcastReceiver 开始的,因此没有 UI。
我想让用户在按下音量减小键时有机会静音。
请指导我这是如何可能的。我见过一些其他相关问题,但没有得到任何明确的想法。到底能不能做呢。请建议。
非常感谢您的回复。
谢谢
I have a BroadCastReceiver that starts a background service. This service speaks some text using TTS. Since it all starts with a BroadcastReceiver, there is no UI.
I want to give the user an opportunity to mute when he presses volume down key.
Please guide me how this is possible. I have seen few other related questions but did not get any clear idea. Is it possible to do or not. Please suggest.
Your response is highly appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在用户显式启动之前,您的应用程序无法响应任何广播。这意味着:应用程序必须首先由用户通过 Activity 调用,因此您的应用程序必须至少具有 Activity 和 <强>用户界面。
Your App can not responds any broadcast until user start it explicitly.It means that:The application must first be invoked by the user through of activity,and so your App has to have at least on Activity and UI.