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 ().