Android Context Get getSavedPostsPath(Context context)

Here you can find the source of getSavedPostsPath(Context context)

Description

get Saved Posts Path

License

Apache License

Declaration

private static String getSavedPostsPath(Context context) 

Method Source Code

//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;
    }//from  ww  w .  j a va 2  s.c o m
}

Related

  1. getReceiverMetaData(Context context, Class receiverClass, String key)
  2. getRequestQueue(Context ctx)
  3. getResDimen(Context context, int resId)
  4. getResourcesPath(Context context, String url)
  5. getRevokedPerms(String packageName, Context ctx)
  6. getScaledDensity(Context context)
  7. getScenario(Context context, String filename, int widgetid, int defaultScenario)
  8. getSeed(Context context)
  9. getSelectedLangCodes(Context context, int[] indexes, boolean[] selectedItems, int codeResourceId)