StorageManager.ActionClearAppCache Field

Definition

Activity Action: Allows the user to free up space by clearing app external cache directories.

[Android.Runtime.Register("ACTION_CLEAR_APP_CACHE", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_EXTERNAL_STORAGE")]
public const string ActionClearAppCache;
[<Android.Runtime.Register("ACTION_CLEAR_APP_CACHE", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_EXTERNAL_STORAGE")>]
val mutable ActionClearAppCache : string

Field Value

Attributes

Remarks

Activity Action: Allows the user to free up space by clearing app external cache directories. The intent doesn't automatically clear cache, but shows a dialog and lets the user decide.

This intent should be launched using Activity#startActivityForResult(Intent, int) so that the user knows which app is requesting to clear cache. The returned result will be: Activity#RESULT_OK if the activity was launched and all cache was cleared, OsConstants#EIO if an error occurred while clearing the cache or Activity#RESULT_CANCELED otherwise.

Java documentation for android.os.storage.StorageManager.ACTION_CLEAR_APP_CACHE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to