<How to get the phone number from MMS message URI ...
# stackoverflow
u
How to get the phone number from MMS message URI string in Android I am building an Android application using Kotlin. In my app, I need to retrieve the sender address/ phone number of the MMS message from the URI string. I have a URI string in this format, content://mms/inbox/60. I tried using Id like this private fun getSenderAddress(messageId: String): String { val selection = "_id = $messageId" val uri = Uri.parse("content://mms") val cursor: Cursor = context.contentResolver.query(uri, arrayOf("*"), selection, null, null) as...