What is MMS
MMS is stand for Multimedia Messaging Service
In android,MMS is stored at content://mms,
You can get the MMS list by the following code:
final String[] projection = new String[] { "*" };
Uri uri = Uri.parse("content://mms");
String selection = "date >= ?";
String[] selectionArgs = new String[] { sStartDate };
Cursor cur = contentResolver.query(uri, projection, selection, selectionArgs, null);
Text and images are stored at different place:”content://mms/part/@ID”,
where id is the id of MMS which retrieved from the first step
You can get the text of an android MMS by the following code:
Uri partURI = Uri.parse("content://mms/part/" + id);
InputStream is = null;
StringBuilder sb = new StringBuilder();
is = ContentResolver.openInputStream(partURI);
if (is != null) {
InputStreamReader isr = new InputStreamReader(is, "UTF-8");
BufferedReader reader = new BufferedReader(isr);
String temp = reader.readLine();
while (temp != null) {
sb.append(temp);
temp = reader.readLine();
}
}
To get an image from MMS,the code is a little bit different:
Uri partURI = Uri.parse("content://mms/part/" + _id);
InputStream is = null;
Bitmap bitmap = null;
try {
is = EAUtil.GetContentResolver().openInputStream(partURI);
bitmap = BitmapFactory.decodeStream(is);
} catch (IOException e) {
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
}
Once you have read the data from a MMS,you can do what you want then,good luck:)