---
title: "从相册获取图片并读取图片名称"
author: "Java-Object"
date: "2013-06-18T23:52:46Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2013-06-18T23:52:46Z"
id: 1888980
url: "https://hezd.iteye.com/blog/1888980"
---

转载自：[http://www.eoeandroid.com/thread-6687-1-1.html](http://www.eoeandroid.com/thread-6687-1-1.html) 

 

Uri uri = data.getData();  
        Cursor cursor = getContentResolver().query(uri, null, null, null, null);  
        cursor.moveToFirst();  
        String imgNo = cursor.getString(0); //图片编号  
        String imgPath = cursor.getString(1); //图片文件路径  
        String imgSize = cursor.getString(2); //图片大小  
        String imgName = cursor.getString(3); //图片文件名