Android SMS module analysis (6) add and delete received wappush messages and MMS attachments

Source: Internet
Author: User

1. The sequence chart 1.1 of wappush reception is shown in the following figure:

Ii. add and delete MMS attachments

Add MMS attachments: The addattachment (INT type) function in composemessageactivity is divided into seven cases based on the type.

Mediaselectlistactivity. add_image

Mediaselectlistactivity. take_picture

Mediaselectlistactivity. add_video

Mediaselectlistactivity. record_video

Mediaselectlistactivity. add_sound

Mediaselectlistactivity. record_sound

Mediaselectlistactivity. add_slideshow

The onactivityresult () function is returned when an application reads media data from an external activity.

Delete the attachment. The attachmenteditor contains a handler to send messages to composemessageactivity. All the buttons for deleting attachments are on attachmenteditor. There are different buttons for different media types, but they are the same after being pressed. The reason is that all attachments exist in the slideshowmodel, And the slideshowmodel is: arraylist <slidemodel> mslides; composed of one slide column. Each slide can contain video, image, audio, and text. The first three of them generally cannot coexist. The only exception is image and audio.

Return to the handlemessage function in the handler of the remove operation composemessageactivity. The operation after receiving the message deletion is setattachment ().

Related Article

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.