improving the messages delivery status

This commit is contained in:
tibbi 2021-01-01 19:00:40 +01:00
parent 8ac5a1d65e
commit d3494014a6
10 changed files with 67 additions and 4 deletions

View file

@ -554,6 +554,16 @@ fun Context.markThreadMessagesUnread(threadId: Long) {
}
}
fun Context.updateMessageDeliveryStatus(id: Long, status: Int) {
val uri = Sms.CONTENT_URI
val contentValues = ContentValues().apply {
put(Sms.TYPE, status)
}
val selection = "${Sms._ID} = ?"
val selectionArgs = arrayOf(id.toString())
contentResolver.update(uri, contentValues, selection, selectionArgs)
}
fun Context.updateMessageSubscriptionId(messageId: Long, subscriptionId: Int) {
val uri = Sms.CONTENT_URI
val contentValues = ContentValues().apply {