The SMS Framework architecture on KK has been modified to introduce the concept of default application
If more than one apk is installed on the phone, a default AP must be set, and only the default AP has permission to read and write the database.
If the non-default AP goes to send MMS, the framework will write this message to the database
KK Previous version, if the three-party apk to send text messages, as long as this apk does not write the text message content to the database will not be displayed.
After the KK version, if the three-way apk to send a text message, although this apk does not write the text message content to the database, but because it is not the default AP, after sending the framework will detect this situation and then write the text message to the database
Take Com.carrot.iceworld this apk as an example, if you do not want it to send out the SMS display, you need to make the following changes:
Smsdispatcher.java-Handlesendcomplete
if ((Pplresult = = False) && Smsapplication.shouldwritemessageforpackage (
Tracker.mAppInfo.applicationInfo.packageName, Mcontext)) {
Persist it into the SMS database as a sent message
The user can see it in their default app.
Tracker.writesentmessage (Mcontext);
}
Change the above if statement to
if ((Pplresult = = False) && Smsapplication.shouldwritemessageforpackage (
Tracker.mAppInfo.applicationInfo.packageName, Mcontext) &&! Tracker.mAppInfo.applicationInfo.packageName.equals ("Com.carrot.iceworld"))
If this is a text message from the Com.carrot.iceworld apk, do not let the FW write to the DB
Ask the customer to add a log before this if statement to print the value of the tracker.mAppInfo.applicationInfo.packageName for subsequent debug
Android KK on how to let the three-party APK send SMS does not show up