Back to project page LocalStorage.
The source code is released under:
BSD 3-Clause License Copyright (c) 2013, Ian Lake All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following cond...
If you think the Android project LocalStorage listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ianhanniballake.localstorage; // w w w .j a v a 2s .co m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.provider.DocumentsContract; /** * Receives MEDIA_MOUNTED and MEDIA_REMOVED actions in response to external storage devices changing state */ public class MediaAvailabilityBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, final Intent intent) { // Update the root URI to ensure that only available storage directories appear context.getContentResolver().notifyChange( DocumentsContract.buildRootsUri(LocalStorageProvider.AUTHORITY), null); } }