Read mail Attachment files in Android2.1?
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
.
精彩评论