开发者

Android : Callback on insertion of microSD

Is there any callback mechanism on the Android SDK that will notify my application when I insert/remove a microSD开发者_C百科 card?

Thanks in advance, Parth


You can use an Intent for this. See the ACTION_MEDIA_MOUNTED and ACTION_MEDIA_UNMOUNTED Intent constants.

For reference, I searched the web with the terms "android intent sd card insertion"

Edit You may find this question and its answer more helpful; there's code and examples as well as further detail on the two constants I mentioned, ACTION_MEDIA_MOUNTED and ACTION_MEDIA_UNMOUNTED

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜