当前位置: 代码迷 >> Android >> android点滴之基准SD卡状态变化事件广播接收者的注册
  详细解决方案

android点滴之基准SD卡状态变化事件广播接收者的注册

热度:10   发布时间:2016-04-28 05:42:24.0
android点滴之标准SD卡状态变化事件广播接收者的注册

目前最完整的,需要注册的动作匹配如下:

IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);        intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);        intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);        intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);        intentFilter.addAction(Intent.ACTION_MEDIA_CHECKING);        intentFilter.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL);        intentFilter.addDataScheme("file");        mContext.registerReceiver(mMediaReceiver, intentFilter);   


  相关解决方案