/** * 将uri转换为字符串 */public static String UriToString(Uri uri, Activity act) {String img_path = null;if(uri != null && act != null){String path = "";String[] proj = { MediaStore.Images.Media.DATA };Cursor actualimagecursor = act.managedQuery(uri, proj, null, null, null);int actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);actualimagecursor.moveToFirst();img_path = actualimagecursor.getString(actual_image_column_index);}return img_path;}

更多相关文章

  1. Android 创建一个包含星期的格式字符串
  2. Android源码快速查找文件、搜索字符串和编译
  3. android上传图片以及POST字符串
  4. android调用webservice方法,参数和返回值都用字符串
  5. Android和Java判断字符串是否是中文
  6. Android开发_在Android Studio中搜索项目中出现过的字符串
  7. 字符串类的重量级实现——Rope的初步了解 - 学习Android - 51CTO
  8. Android字符串进阶之二:字符及字符串的测量和处理

随机推荐

  1. Android服务端本地窗口FramebufferNative
  2. ERROR: Unknown command 'crunch'
  3. Android(安卓)Alarm定时任务基础
  4. Android详细教程 - 基础篇完成了
  5. android软键盘弹出,会把原来的界面挤上去
  6. Android(安卓)内核相关内容总结
  7. android webkit学习笔记1---url的load过
  8. android 多点
  9. Android实现内录
  10. Android ListView优化之getView频繁多次