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 android.os.Environment;

import java.io.*;

public class Main {
    private static String getSavedPostsPath(Context context) {
        String dir = String.format("/Android/data/%s/files/", context.getPackageName());
        File sd = Environment.getExternalStorageDirectory();
        String filePath = sd.getPath() + dir + "savedPosts.txt";

        new File(sd.getPath() + dir).mkdirs();

        return filePath;
    }
}