Attachment
#
AttachmentNote : If Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
Attachment is a feature that allows users to send images,videos, documents and audios. Attachment appears in the
message input field region of the FlyChatFragment
class.
In MirrorFly UIKit for Android, there are currently four type of file messages that users can send : image, video, documents and audio. These attachment files can be shared with other members in the single chat or group chat from the sender’s mobile device.
#
Gallery select option available in the attachment
#
Image & Video AttachmentNote : If Image & Video Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
#
Documents AttachmentNote : If Documents Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
#
Audio MessageNote : If Audio Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
To send audio as a message clicks the microphone icon given in the Message input box to record the audio. Once audio recored tap the send icon button to send the audio message.
#
Contact AttachmentNote : If Contact Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
To send the contact as a message clicks the attachment icon given in the Message input box to navigate to the contact page. Select the contact from the list and preview the selected contact and then send the contact message.
#
Location AttachmentNote : If Location Attachment feature unavailable for your plan then it will not display in
FlyChatFragment
.
To send the location as a message clicks the attachment icon given in the Message input box to navigate to the user location page. Select the location by dragging location pin or by clicking particular location in google map and then send the location message.
Step 1: Add the below dependencies required by the SDK in the app/build.gradle file.
Step 2: Open the AndroidManifest.xml and add below key for google map Location Sharing.
#
Location Sharing Screen.#
View All MediaView All Media is a feature that allows users to view the sent and received images, videos, documents and audios. View All Media appears in the User info and Group info.
Use the intent to move from one activity to the ViewAllMediaActivity
using the unique JID
of the chat as follows:
#
Preview screen regionsRegion | Description |
---|---|
Header | Acts as an ActionBar in the activity. By default, it displays the back navigation button, preview name text, as well as two buttons on the left and right, which are all customizable. If the left button is clicked, the finish() method of the activity will be called to take the user to the media picker of the MeidaPickerActivity. If the right button is clicked, current image in the screen will be deleted |
ViewPager | UIKit provides swipe option to see the selected imges. |
Caption(Message) input field | Enables users to send a image with caption message which are all customizable |
#
Image Preview Screen#
Video Post Preview Screen#
StyleSetStyleSet is the list of styles provided by MirrorFly UIKit. Customizing the style of Image attachment
list items is straightforward: Simply inherit the MirrorFly UIKit-defined styles, then override the res/values/styles.xml
or res/values/themes.xml
file from the list below.
For example, the MessageInput, AppBar,
theme can be changed by overriding the Widget.MirrorFly.MessageInput
.
Listed below are all the Attachment
style used in UIKit for Android. Styles can be changed by overwriting the res/values/styles.xml
or res/values/themes.xml
files with the same name.
#
StringSetListed below are all the strings used in UIKit Image & Video attachement
for Android. Strings can be changed by overwriting the res/values/strings.xml
files with the same name.
#
IconSetListed below are all the icons used in UIKit Image & Video attachment
for Android. Icons can be changed by overwriting the res/drawable
files with the same name.
Icon name | Image | Description |
---|---|---|
ic_delete_media | Icon of delete | |
ic_add_more_media | Icon of delete | |
icon_send | Icon of Message Send. | |
icon_arrow_left | Goes back to the previous page. | |
ic_microphone | Icon shows to record the audio | |
ic_audio_recording_icon | Icon shows the recording state of audio | |
ic_audio_record | Icon shows audio is recorded | |
ic_audio_record_delete | Icon is to delete the recored audio | |
ic_play_audio_recipient | Icon to play the recored audio on the sender side | |
ic_audio_music_icon | Icon of audio music | |
ic_cancel_grey | Icon to cancel the upload or download | |
ic_file_download_grey | Icon to download the audio | |
ic_file_upload_light | Icon to upload the audio | |
ic_file_upload_light | Icon to upload the audio | |
ic_profile | Icon shows in the contact message |
#
DrawableListed below are all the drawable used in the UIKit Image and Video attachment & Audio recoridng
for Android. Icons can be changed by overwriting the res/drawable
files with the same name.
Drawable name | Description |
---|---|
drawable_audio_message_sender_background.xml | To change shape of sender background : Audio |
drawable_audio_message_background.xml | To change shape of receiver background : Audio |
bg_download_progress.xml | To change layout of progress bar : Audio |
horizontal_file_receiver_progress_bar.xml | To change horizontal line of progress bar : Audio Receiver |
horizontal_file_sender_progress_bar.xml | To change horizontal line of progress bar : Audio Sender |