I created mms message. The problem is: that is showed in my app, but that does not show in android native message application. Do you have an idea what can be wrong? What should I set for the thread_id? Thanks in advance.
--- Here is my code ---
ContentResolver cr = getContentResolver();
ContentValues cv = new ContentValues();
cv.put("thread_id", System.currentTimeMillis() % 100);
cv.put("ct_t", "application/vnd.wap.multipart.related");
cv.put("read", "1");
Uri temp_mms = cr.insert(Uri.parse("content://mms/inbox"), cv);
String str_uri = temp_mms.toString();
String newID = temp_mms.getLastPathSegment().trim();
ContentValues cv_addr2 = new ContentValues();
cv_addr2.put("address", "112233");
Uri temp_mms_addr2 = cr.insert(Uri.parse("content://mms/"+ newID +"/addr"), cv_addr2);
// ------------------------------PART Table ContentValues
Uri uriPart = Uri.parse("content://mms/"+ newID +"/part");
ContentValues cv_part2 = new ContentValues();
cv_part2.put("ct", "image/jpeg");
Uri temp_mms_part2 = cr.insert(uriPart, cv_part2);
OutputStream os = cr.openOutputStream(temp_mms_part2);
InputStream is = cr.openInputStream(selectedImageUri);
byte[] buffer = new byte[256];
for (int len = 0; (len = is.read(buffer)) != -1; ) {
os.write(buffer, 0, len);
}