Ensure that MMS reception ACK is sent to prevent duplicate MMS

This implements the getMmscInfoForReceptionAck method
in MmsReceiver which is according to android-smsmms
library required for some carriers, since otherwise
MMS would be duplicated. Unfortunately,
accessing MMSC information is more restricted with
each version of Android and this implementation relies
on system database on older versions and uses APN database
included with android-smsmms for newer versions, which will
work only on the default SIM card.
This commit is contained in:
Ensar Sarajčić 2023-07-12 17:45:24 +02:00
parent 7ca11c8427
commit d97a6f6a5f
2 changed files with 72 additions and 1 deletions

View file

@ -1,11 +1,17 @@
package com.simplemobiletools.smsmessenger
import android.app.Application
import com.klinker.android.send_message.ApnUtils
import com.simplemobiletools.commons.extensions.checkUseEnglish
import com.simplemobiletools.commons.helpers.isRPlus
class App : Application() {
override fun onCreate() {
super.onCreate()
checkUseEnglish()
if (isRPlus()) {
ApnUtils.initDefaultApns(this) {}
}
}
}