2013.09.02(2)——— android 耳机意外拔出关闭声音


<receiver android:name=".MusicIntentReceiver">   <intent-filter>      <action android:name="android.media.AUDIO_BECOMING_NOISY" />   </intent-filter></receiver>





public class MusicIntentReceiver implements android.content.BroadcastReceiver {   @Override   public void onReceive(Context ctx, Intent intent) {      if (intent.getAction().equals(                    android.media.AudioManager.ACTION_AUDIO_BECOMING_NOISY)) {          // signal your service to stop playback          // (via an Intent, for instance)      }   }}











更多相关文章

  1. Android's 10 ms Problem? SOLVED - android 10ms 声音延迟问题
  2. pyaudio与优美的声音
  3. 痞子衡嵌入式:PCM编码与Waveform音频文件(.wav)格式详解
  4. 在 iMovie 中如何添加音乐和声音片段?
  5. 如何提取视频声音,将视频中的音乐提取出来
  6. macOS下使用非Apple的蓝牙耳机音质差?不妨试试这方法
  7. Transformer稀疏模型:​将文本、图像、声音一网打尽
  8. 【故障】dell G7 7588笔记本已安装声卡驱动无声音
  9. 蚂蚁上市朋友圈都有些什么神仙声音?

随机推荐

  1. 新建ArcGIS Project for Android项目失败
  2. android工程下轻松运行java main程序
  3. Android学习笔记(九)之Android(安卓)获取
  4. MVP -----个人理解与示例(android例子 实
  5. android toast 和checkbox and radiogrou
  6. android中调用金山词霸
  7. Android显示图片自适应(控件+网页)
  8. android tool export报错为support v7包
  9. Android(安卓)studio 出现 Unsupported m
  10. Android完全退出应用程序