Creating a message app that backups the current messages within the inbox. The issue is that I cannot seem to add anything into my messages. I am trying to target a specific thread id.
The code below returns the following Uri, which I am not sure what it means as well: content://sms/inbox/0
public static final String SMS_URI = "content://sms/inbox";
public static final String ADDRESS = "address";
public static final String PERSON = "person";
public static final String DATE = "date";
public static final String READ = "read";
public static final String STATUS = "status";
public static final String TYPE = "type";
public static final String BODY = "body";
public static final String SEEN = "seen";
public static final String THREAD = "thread_id";
ContentValues values = new ContentValues();
values.put( ADDRESS, "+190000000" );
values.put( DATE, System.currentTimeMillis() );
values.put( READ, MESSAGE_IS_NOT_READ );
values.put( TYPE, MESSAGE_TYPE_INBOX );
values.put( SEEN, MESSAGE_IS_NOT_SEEN );
values.put(THREAD, "106");
values.put(BODY, "Adding SMS");
Uri uri = getContentResolver().insert( Uri.parse( SMS_URI ), values );
Log.v("MainActivity", "Done Adding SMS - Uri: " + uri.toString());
Any help or pointers would be appreciated. I should have all the appropriate permissions in my Android Manifest. Also looking at a SDK version between 19 - 23.