delete App Private File - Android App

Android examples for App:Resource

Description

delete App Private File

Demo Code


//package com.java2s;

import android.content.Context;
import android.util.Log;

public class Main {
    private static final String LOG_TAG = "AndroidFileUtils";

    /**/*from w ww  .j  a v  a 2 s.com*/
     * @param pContext
     * @param pFileName
     * @return
     */
    public static boolean deleteAppPrivateFile(Context pContext,
            String pFileName) {
        try {
            return pContext.deleteFile(pFileName);
        } catch (Exception e) {
            Log.e(LOG_TAG, "deleteAppPrivateFile: " + pFileName);
            return false;
        }
    }
}

Related Tutorials