Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.os.Environment;

import android.preference.PreferenceManager;

import java.io.File;

public class Main {
    public static String GetBackupFolder(Context paramContext) {
        File dir = new File(Environment.getExternalStorageDirectory(), "backups");
        if (!dir.exists())
            dir.mkdir();

        return PreferenceManager.getDefaultSharedPreferences(paramContext).getString("prefDBLocalFolder",
                dir.getAbsolutePath());
    }
}