0
下面的代碼告訴我,MediaScanner在SD卡上啓動了,之後彈出爲什麼?發生了什麼?在SD卡被彈出後,MediaScanner在SD卡上運行?
if(intent.getDataString().equals("file:///mnt/extsd"))
{
if(Intent.ACTION_MEDIA_SCANNER_STARTED.equals(intent.getAction()))
{
//Media scanner is started
}
else if(Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(intent.getAction()))
{
}
}
的事情是,到/ mnt/SD卡IS Environment.getExternalStorageDirectory的輸出(),但這種聯繫是有益的仍然 – Sojurn
其實你也必須檢查SD卡狀態。我的意思是像下面的代碼。 – Stan