Example usage for android.content Context getNoBackupFilesDir

List of usage examples for android.content Context getNoBackupFilesDir

Introduction

In this page you can find the example usage for android.content Context getNoBackupFilesDir.

Prototype

public abstract File getNoBackupFilesDir();

Source Link

Document

Returns the absolute path to the directory on the filesystem similar to #getFilesDir() .

Usage

From source file:Main.java

static File getDir(final Context c) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
        return c.getNoBackupFilesDir();
    else//  ww  w  .  ja va  2s.c om
        return c.getFilesDir();
}

From source file:com.jsonstore.util.JSONStoreUtil.java

public static final File getNoBackupFilesDir(Context ctx) {
    if (android.os.Build.VERSION.SDK_INT <= LOLLIPOP_MR1)
        return ctx.getFilesDir();
    else//from w  ww  .j a v a  2  s .c  om
        return ctx.getNoBackupFilesDir();
}