Example usage for android.app Activity deleteFile

List of usage examples for android.app Activity deleteFile

Introduction

In this page you can find the example usage for android.app Activity deleteFile.

Prototype

@Override
    public boolean deleteFile(String name) 

Source Link

Usage

From source file:Main.java

public static void deletePrivateFile(Activity activity, String filename) {
    activity.deleteFile(filename);
}

From source file:org.matrix.matrixandroidsdk.db.ConsoleMediasCache.java

/**
 * Clear the medias caches./*  w  w  w.  ja v  a2 s  .  c o  m*/
 * @param context The application context to use.
 */
public static void clearCache(Activity context) {
    String[] filesList = context.fileList();

    for (String file : filesList) {
        try {
            context.deleteFile(file);
        } catch (Exception e) {

        }
    }

    BitmapWorkerTask.clearBitmapsCache();
}