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
精彩评论