Sms ui-MMS settings on the SMS settings page

Source: Internet
Author: User
MMS settings 1. Preface for MMS settings, the main related items are sending report, read Report, and automatic attachment receiving. These options are very important for users, such as automatic reception. If the user opens the options, the MMS will be automatically downloaded as soon as it is received. What problems will this cause, currently, there are many spam MMS messages, and users do not want to consume traffic to receive them. Therefore, users must disable this function. The following figure shows the main interface for setting the message. Figure 1 shows the MMS setting interface. 2. The function parses the 2.1 transmission report. The Read report is similar to the text message transmission report. is it used ??
The sending of text messages and MMS is divided in the send method of workingmessage. The SMS calls sendsmswork and the MMS calls sendmmswork; here, the MMS settings cannot be removed from this method. sendmmswork will call the updatepreferencesheaders () method. Here, it is the packaging of the MMS header,
// Update the headers which are stored in sharedpreferences. private void updatepreferencesheaders (sendreq) throws mmsexception {sharedpreferences prefs = preferencemanager. getdefasharsharedpreferences (mcontext); // expiry. sendreq. setexpiry (prefs. getlong (messagingpreferenceactivity. expiry_time, default_expiry_time); // priority. sendreq. setpriority (prefs. getint (messagingpreferenceactivity. priority, default_priority ));// Delivery report. Transfer Report Boolean DR = prefs. getboolean (messagingpreferenceactivity. mms_delivery_report_mode, default_delivery_report_mode); sendreq. setdeliveryreport (DR? Pduheaders. value_yes: pduheaders. value_no); // read report. Read report Boolean RR = prefs. getboolean (messagingpreferenceactivity. read_report_mode, callback); sendreq. setreadreport (RR? Pduheaders. value_yes: pduheaders. value_no );}

We can see that both the transferred report and the Read report are set here.

2.2 automatic receiving attachments are generally divided into two types: General MMS receiving and roaming. This article does not analyze the roaming automatic receiving MMS, and simply analyzes the General MMS receiving problems. We all know that a text message will be sent to the user when receiving the mms. If the automatic download function is enabled after the SMS notification, the program will not download it, you can manually download the file on the page. The download action is in the icationicationtransaction class;
public void run() {        DownloadManager downloadManager = DownloadManager.getInstance();        boolean autoDownload = downloadManager.isAuto();        boolean dataSuspended = (MmsApp.getApplication().getTelephonyManager().getDataState() ==                TelephonyManager.DATA_SUSPENDED);            // By default, we set status to STATUS_DEFERRED because we            // should response MMSC with STATUS_DEFERRED when we cannot            // download a MM immediately.            int status = STATUS_DEFERRED;            // Don't try to download when data is suspended, as it will fail, so defer download            if (!autoDownload || dataSuspended) {                downloadManager.markState(mUri, DownloadManager.STATE_UNSTARTED);                sendNotifyRespInd(status);                return;            }            downloadManager.markState(mUri, DownloadManager.STATE_DOWNLOADING);               ...............................................................

You can see that automatic download is required based on the value set by the user.

3. Summary

This article briefly describes the problem related to MMS settings. Without detailed analysis, it may give you a more abstract feeling, here, I have not carefully discussed the MMS part, so I will give a rough introduction to the setting. I will analyze the highlights of MMS in detail later.

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.