Get Application File Path : Application « Core Class « Android

Home
Android
1.2D Graphics
2.Animation
3.Core Class
4.Database
5.Date Type
6.Development
7.File
8.Game
9.Hardware
10.Media
11.Network
12.Security
13.UI
14.User Event
Android » Core Class » Application 
Get Application File Path
  
//package org.acra.util;

import java.io.File;


import android.content.Context;
import android.content.res.Configuration;
import android.os.Environment;
import android.os.StatFs;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;

/**
 * Responsible for providing base utilities used when constructing the report.
 * <p/>
 @author William Ferguson
 @since 4.3.0
 */
public final class ReportUtils {

    public static String getApplicationFilePath(Context context) {
        final File filesDir = context.getFilesDir();
        if (filesDir != null) {
            return filesDir.getAbsolutePath();
        }

      //  Log.w(ACRA.LOG_TAG, "Couldn't retrieve ApplicationFilePath for : " + context.getPackageName());
        return "Couldn't retrieve ApplicationFilePath";
    }

}

   
    
  
Related examples in the same category
1.Application Widget
2.extends Application
3.Loads the list of installed applications in mApplications.
4.Implementation of the android.app.Instrumentation class, allowing you to run tests against application code.
5.This application demonstrates the seeking capability of ValueAnimator.
6.Creates a file storing a UUID on the first application start. This UUID can then be used as a identifier of this specific application installation.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.