1.打开根目录下test.jpgBitmap bm = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory().getAbsolutePath()+"/test.jpg");int[] pixels = new int[b...
分类:
移动开发 时间:
2015-05-18 18:37:04
阅读次数:
174
这几个方法是有一次无意的发现,我当时也不知道什么意思,就百度了,查到了一些列子:原文地址http://www.blogjava.net/dreamstone/archive/2007/08/08/134968.html一:介绍[java]view plaincopygetPath()[java]vi...
分类:
其他好文 时间:
2015-05-12 20:52:30
阅读次数:
159
String path; public voidmain(String[] args) { File file=new File(""); path=file.getAbsolutePath();syso(path);}结果:D:\svnout\borncrm-biz
分类:
系统相关 时间:
2015-05-06 17:21:16
阅读次数:
159
获取机身存储路径(可以通过openFileInput,openFileOutput进行操作)
String path=Environment.getDataDirectory().getAbsolutePath();返回/data
获取内置SD卡路径:
public String getStorageDir(){
if(!(Environment.getExternalSto...
分类:
移动开发 时间:
2015-04-30 21:53:43
阅读次数:
483
public void installApk() { File apkfile = new File(Environment.getExternalStorageDirectory(), strApkFile); Log.i("Update", apkfile.getAbsolutePath());...
分类:
移动开发 时间:
2015-04-30 15:53:31
阅读次数:
159
// 获取当前程序路径 getApplicationContext().getFilesDir().getAbsolutePath();// 获取该程序的安装包路径 String path=getApplicationContext().getPackageResourcePath(...
分类:
移动开发 时间:
2015-04-17 20:18:24
阅读次数:
140
1. //返回/cache---------------安卓系统目录下的cache目录,不是外部存储卡的
String cache = Environment.getDownloadCacheDirectory().getAbsolutePath();
//返回/system---------------------安卓系统目录下的system目录,不是...
分类:
其他好文 时间:
2015-04-16 17:39:59
阅读次数:
105
对于android里的接口类,直接new!!!
手机SD卡路径获取
通过代码,获取sd卡路径。
获取SDcard:mnt/sdcard
注意要补充上【反斜杠】!!!
String path=Environment.getExternalStorageDirectory().getAbsolutePath();
System.out.println(path);
获取SDca...
分类:
移动开发 时间:
2015-03-11 00:47:53
阅读次数:
275
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
BufferedWriter writer ;
try {
String path = getFilesDir().getAbsolutePath() ;
File file = new...
分类:
移动开发 时间:
2015-01-31 18:09:35
阅读次数:
225
(一)获取总根 File[] fileList=File.listRoots(); //返回fileList.length为1 //fileList.getAbsolutePath()为"/" //这就是系统的总根 (二)打开总根目录 File file=...
分类:
移动开发 时间:
2014-12-15 15:07:13
阅读次数:
236