android.intent.action.MEDIA_MOUNTED广播无法收到的问题
2010-12-11 16:26
741 查看
只需要增加一条语句就好, <data android:scheme="file"/>,无该语句,BroadcastReceiver将无法收到SD卡插拔广播消息
<intent-filter>
<action android:name="android.intent.action.MEDIA_MOUNTED"/>
<action android:name="android.intent.action.MEDIA_EJECT" />
<data android:scheme="file"/>
</intent-filter>
data元素XML定义(参见/reference/android/R.styleable.html#AndroidManifestData):
host
mimeType
path
pathPattern
pathPrefix
port
scheme,例如file,http,https等
<intent-filter>
<action android:name="android.intent.action.MEDIA_MOUNTED"/>
<action android:name="android.intent.action.MEDIA_EJECT" />
<data android:scheme="file"/>
</intent-filter>
data元素XML定义(参见/reference/android/R.styleable.html#AndroidManifestData):
host
mimeType
path
pathPattern
pathPrefix
port
scheme,例如file,http,https等
相关文章推荐
- android.intent.action.MEDIA_MOUNTED广播无法收到的问题
- Android问题集锦之三十八:not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- Android问题集锦之三十八:not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- Android问题(二)not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- 解决 not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED解决方法
- Android应用在未启动的情况下无法收到指定广播的问题总结
- Android4.4中拒绝发送Intent.ACTION_MEDIA_MOUNTED扫描SD卡的广播
- android.intent.action.BOOT_COMPLETED开启无法重启的问题
- 解决android4.4中 Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- Android4.4中拒绝发送Intent.ACTION_MEDIA_MOUNTED扫描SD卡的广播
- Android4.4中拒绝发送Intent.ACTION_MEDIA_MOUNTED扫描SD卡的广播
- Android4.4中拒绝发送Intent.ACTION_MEDIA_MOUNTED扫描SD卡的广播
- Android应用在未启动的情况下无法收到指定广播的问题总结
- Android应用在未启动的情况下无法收到指定广播的问题总结
- 解决android4.4中 Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
- android 收不到ACTION_MEDIA_MOUNTED 广播
- Android4.4中拒绝发送Intent.ACTION_MEDIA_MOUNTED扫描SD卡的广播 - Geder
- Android无法收到指定广播的问题总结
- Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED