开发者

Read mail Attachment files in Android2.1?

开发者 https://www.devze.com 2023-01-08 07:16 出处:网络
I configure email by using the android2.1 emulator. When I download the files from mail attachment I get the path content://com.android.email.attachmentprovider/1/1/RAW

I configure email by using the android2.1 emulator. When I download the files from mail attachment I get the path content://com.android.email.attachmentprovider/1/1/RAW

I need to read that file data. How to read the data from the device.?? Is there any permission to read file from the phone memory. My code is here:

 intent = 开发者_StackOverflowgetIntent();        
 String str_sel_fname=intent.getDataString();

In the eclipse file explorer /data/data/com.android.email/databases/1.db_att/1

here 1 is store the attachment file .Now can anyone help me to get the data from that.??


Try getContentResolver().openInputStream(). openInputStream() on ContentResolver should give you an InputStream on that content Uri.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号