Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import java.io.File;

public class Main {
    private static File getStorageFolder(Context context) {
        // Get external storage folder
        File storageFolder = context.getExternalFilesDir(null);
        if (storageFolder == null) {
            // If failed, get internal storage folder
            storageFolder = context.getFilesDir();
        }
        return storageFolder;
    }
}