Fetch Image from MMS - Android -


i need fetch image mms having txt , image.

query.getstring(cpart.getcolumnindex("ct");  

...returns text/plain type.

don't show image type.

each mms message has multiple parts stored in content://mms/part/ table. parts may text, may images , other media types. once have id of mms want read, query parts:

cursor query = getcontentresolver().query(uri.parse("content://mms/part", null, "mid = " + mmsid, null, null); 

if mms contains , image, have part content type image type.

if(query.movetofirst()) {     {         string type = query.getstring(query.getcolumnindex("ct"));         if(type.equals("image/bmp") || type.equals("image/jpeg") || ...)              //read image     while(query.movetonext()); } 

look here more information reading mmss.


Comments