handle deleting individual messages
This commit is contained in:
parent
2a319f9550
commit
3cf6ce2e37
4 changed files with 58 additions and 7 deletions
|
|
@ -182,6 +182,13 @@ fun Context.deleteThread(id: Int) {
|
|||
contentResolver.delete(uri, selection, selectionArgs)
|
||||
}
|
||||
|
||||
fun Context.deleteMessage(id: Int) {
|
||||
val uri = Telephony.Sms.CONTENT_URI
|
||||
val selection = "${Telephony.Sms._ID} = ?"
|
||||
val selectionArgs = arrayOf(id.toString())
|
||||
contentResolver.delete(uri, selection, selectionArgs)
|
||||
}
|
||||
|
||||
fun Context.markSMSRead(id: Int) {
|
||||
val uri = Telephony.Sms.CONTENT_URI
|
||||
val contentValues = ContentValues().apply {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue