码迷,mamicode.com
首页 >  
搜索关键字:getabsolutepath    ( 74个结果
android打开,保存图片到sd卡,显示图片
1.打开根目录下test.jpgBitmap bm = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory().getAbsolutePath()+"/test.jpg");int[] pixels = new int[b...
分类:移动开发   时间:2015-05-18 18:37:04    阅读次数:174
File的getPath()和getAbsolutePath()和getCanonicalPath()的区别
这几个方法是有一次无意的发现,我当时也不知道什么意思,就百度了,查到了一些列子:原文地址http://www.blogjava.net/dreamstone/archive/2007/08/08/134968.html一:介绍[java]view plaincopygetPath()[java]vi...
分类:其他好文   时间:2015-05-12 20:52:30    阅读次数:159
获取项目根目录(非tomact)
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
Android获取机身存储、内置SD卡与外置TF卡路径
获取机身存储路径(可以通过openFileInput,openFileOutput进行操作) String path=Environment.getDataDirectory().getAbsolutePath();返回/data 获取内置SD卡路径: public String getStorageDir(){ if(!(Environment.getExternalSto...
分类:移动开发   时间:2015-04-30 21:53:43    阅读次数:483
Android安装apk
public void installApk() { File apkfile = new File(Environment.getExternalStorageDirectory(), strApkFile); Log.i("Update", apkfile.getAbsolutePath());...
分类:移动开发   时间:2015-04-30 15:53:31    阅读次数:159
android获取当前应用程序路径
// 获取当前程序路径 getApplicationContext().getFilesDir().getAbsolutePath();// 获取该程序的安装包路径 String path=getApplicationContext().getPackageResourcePath(...
分类:移动开发   时间:2015-04-17 20:18:24    阅读次数:140
Andriod文件路径探究
1.      //返回/cache---------------安卓系统目录下的cache目录,不是外部存储卡的         String cache = Environment.getDownloadCacheDirectory().getAbsolutePath();      //返回/system---------------------安卓系统目录下的system目录,不是...
分类:其他好文   时间:2015-04-16 17:39:59    阅读次数:105
[Android开发学习] day06
对于android里的接口类,直接new!!!   手机SD卡路径获取 通过代码,获取sd卡路径。 获取SDcard:mnt/sdcard   注意要补充上【反斜杠】!!! String path=Environment.getExternalStorageDirectory().getAbsolutePath(); System.out.println(path); 获取SDca...
分类:移动开发   时间:2015-03-11 00:47:53    阅读次数:275
android 向data目录files目录下创建新的目录
@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
Android 文件系统路径
(一)获取总根 File[] fileList=File.listRoots(); //返回fileList.length为1 //fileList.getAbsolutePath()为"/" //这就是系统的总根 (二)打开总根目录 File file=...
分类:移动开发   时间:2014-12-15 15:07:13    阅读次数:236
74条   上一页 1 ... 4 5 6 7 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!