如何在andriod中检测SDCard的移除和插入 [英] How to detect SDCard removal and insertion in andriod

查看:116
本文介绍了如何在andriod中检测SDCard的移除和插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用中,我需要在设备(手机)中插入或移除 sd卡时显示 。如何接收此活动的通知。是否有任何广播听众。请帮帮我。

Hi,
In my app I need to show when a sd card is inserted or removed from the device(mobile). How to receive the notification for this event. Is there any broadcast listener for it. Please help me.

推荐答案

请参阅:

http://stackoverflow.com/questions/6973776/android-how-to-listen-to-sd-card-removed-unexpectedly [ ^ ],

http://stackoverflow.com/ questions / 7552413 / listener-for-sd-card-removal [ ^ ]。



(顺便说一句,我看到了一些答案,甚至还有一些文章创造了在Android中没有解决此问题的印象;但事实并非如此。:-))



-SA
Please see:
http://stackoverflow.com/questions/6973776/android-how-to-listen-to-sd-card-removed-unexpectedly[^],
http://stackoverflow.com/questions/7552413/listener-for-sd-card-removal[^].

(By the way, I saw some number of "answers" and even some articles which create the impression that this problem is not addressed in Android; but this is not true. :-))

—SA


这篇关于如何在andriod中检测SDCard的移除和插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆