get Files Directory from Activity - Android Activity

Android examples for Activity:Activity Feature

Description

get Files Directory from Activity

Demo Code


//package com.java2s;

import android.app.Activity;

public class Main {
    public static String getFilesDir(Activity activity) {
        return activity.getApplicationContext().getFilesDir()
                .getAbsolutePath();/*from   ww w.  j  a  v a2  s. co m*/
    }
}

Related Tutorials