public static Uri addMessageToUri(ContentResolver resolver,Uri uri,String address,String body,String subject,Long date,boolean read,boolean deliveryReport,long threadId){
  ContentValues values=new ContentValues(7);
  values.put(ADDRESS,address);
  if (date != null) {
    values.put(DATE,date);
  }
  values.put(READ,read ? Integer.valueOf(1) : Integer.valueOf(0));
  values.put(SUBJECT,subject);
  values.put(BODY,body);
  if (deliveryReport) {
    values.put(STATUS,STATUS_PENDING);
  }
  if (threadId != -1L) {
    values.put(THREAD_ID,threadId);
  }
  return resolver.insert(uri,values);
}

public static Uri addMessageToUri ( ContentResolver resolver , Uri uri , String address , String body , String subject , Long date , boolean read , boolean deliveryReport , long threadId ) { ContentValues values = new ContentValues ( 7 ) ; values . put ( ADDRESS , address ) ; if ( date != null ) { values . put ( DATE , date ) ; } values . put ( READ , read ? Integer . valueOf ( 1 ) : Integer . valueOf ( 0 ) ) ; values . put ( SUBJECT , subject ) ; values . put ( BODY , body ) ; if ( deliveryReport ) { values . put ( STATUS , STATUS_PENDING ) ; } if ( threadId != - 1L ) { values . put ( THREAD_ID , threadId ) ; } return resolver . insert ( uri , values ) ; }
add an sms to the given uri with thread_id specified .
