Android KK on how to let the three-party APK send SMS does not show up

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.