Messenger Plugins

MQTT chat android messenger contains 6 plugins by default: smileys, stickers, pictures from DISK, pictures from CAM, records and Visio Notifications.

Smileys

Is used to send smileys.

Stickers

Is used to send some Stickers, you can catch sticker sending event using stickersListener().

Stickers plugin=(Stickers) Mqttchat.getmInstance().getPluginByName(pluginA.stickers);
plugin.setListener(new stickersListener() {
@Override
public void onMqttchatSendSticker(int toUserId,String stickerCode) {
// your custom code here
}
});

Send Picture from DISK

Is used to send pictures from local Disk, you can catch picture sending event using pictureDiskListener()

pictureDisk plugin=(pictureDisk) Mqttchat.getmInstance().getPluginByName(pluginA.pictures_disk);
plugin.setPictureDiskListener(new pictureDiskListener() {
@Override
public void onMqttchatSendPictureDisk(int toUserId,String urlMin,String urlMax) {
//your custom code here
}
});

You can also adjust some plugin parameters:

Parameter

Description

Default Value

MAX_PHOTOS_TO_DROP

Number max of photos to be sent simultaneously

6

MAX_PHOTO_SIZE

Single photo max size

1 Mo

plugin.setMAX_PHOTOS_TO_DROP(3);
plugin.setMAX_PHOTO_SIZE(2);

Send Picture from Camera

Is used to send pictures from Camera, you can catch picture sending event using pictureCamListener().

pictureCam plugin=(pictureCam) Mqttchat.getmInstance().getPluginByName(pluginA.pictures_cam);
plugin.setPictureCamListener(new pictureCamListener() {
@Override
public void onMqttchatSendPictureCam(int toUserId,String urlMin,String url) {
//your custom code here
}
});

You can also adjust some plugin parameters:

Parameter

Description

Default Value

MAX_PHOTOS_TO_DROP

Number max of photos to be sent simultaneously

3

plugin.setMAX_PHOTOS_TO_DROP(1);

Send Voice Notes

Is used to send voice notes, you can catch voice notes sending event using recordsListener().

records plugin=(records) Mqttchat.getmInstance().getPluginByName(pluginA.records);
plugin.setRecordsListener(new recordsListener() {
@Override
public void onMqttchatSendRecord(int toUserid,String duration,String Url){
//your custom code here
}
});

You can also adjust some plugin parameters:

Parameter

Description

Default Value

RECORD_TIME_LIMIT

Max recording time of one single record.

1 min

plugin.setRECORD_TIME_LIMIT(1);

Visio Notifications

Is used for missed and completed calls notifications.