1) Programmatically sending a message (not via Intent
) is easy. Googling is easy - I will not even give a link. When sending to the database is not written - you need to do something like this:
ContentValues values = new ContentValues(); values.put("address", "123456789"); values.put("body", "foo bar"); getContentResolver().insert(Uri.parse("content://sms/sent"), values);
2) Removing SMS from the database is also quite simple:
activity.getContentResolver().delete(Uri.parse("content://sms/" + id), null, null); //id - идентификатор сообщения
3) Editing is identical. It is necessary to get a list of SMS, then on the id to pull out the desired, then write back.
In the manifest, you need to keep a couple of permisens:
<uses-permission android:name="android.permission.READ_SMS"/> <uses-permission android:name="android.permission.WRITE_SMS"/>
The most difficult part is intercepting incoming messages - there are many undocumented features. Only in KitKat there was official support for intercepting incoming messages.