开发者

Android : Callback on insertion of microSD

开发者 https://www.devze.com 2023-02-01 17:52 出处:网络
Is there any callback mechanism on the Android SDK that will notify my application when I insert/remove a microSD开发者_C百科 card?

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

精彩评论

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