Disappearing Messages

Estimated reading time: 3 minutes

The disappearing feature allows the sender to control how long the receiver can view or store the received messages, after which the message will be deleted on both the sender and the receiver side.

You can use this feature on a per-message basis to control which messages should disappear and which messages should not.

Mesibo gives you fine control over how and when a message should disappear by setting Age. You can set three types of Age (time interval) after which the message will disappear. Depending on your app logic, you can use one or all three-time intervals.

Disappear in N seconds after Sent

The sender can set the message to disappear after a fixed time, irrespective of whether the recipient has Received it or not, or Read it or not.

You can make a message disappear in N seconds after it was sent by calling setAge API of MessageParams.

void MessageParams.setAge(long seconds);

setAge takes the following parameters:

Parameter Description
seconds seconds after which message will disappear.

For example, to delete a message in 2 hours (7200 seconds) after it was sent.

params.setAge(7200);

Disappear in N seconds after Delivered

The sender can set the messages to disappear at a certain time after being received by the recipients. This ensures that the message will disappear only after it was received by the recipient and hence, gives time to the recipient to read the message. However, the message will be deleted irrespective of the recipient has read it or not.

You can make a message disappear in N seconds after it was delivered by calling setAgeAfterDelivered API of MessageParams.

void MessageParams.setAgeAfterDelivered(long seconds);

setAgeAfterDelivered takes the following parameters:

Parameter Description
seconds seconds after which message will disappear.

For example, to delete a message in 1 hour (3600 seconds) after it was delivered.

params.setAgeAfterDelivered(3600);

Disappear in N seconds after Read

The sender can set the messages to disappear at a certain time only after being read by the recipients.

You can make a message disappear in N seconds after it was read by calling setAgeAfterRead API of MessageParams.

void MessageParams.setAgeAfterRead(long seconds);

setAgeAfterRead takes the following parameters:

Parameter Description
seconds seconds after which message will disappear.

For example, to delete a message in 1 second after it was read.

params.setAgeAfterRead(1);

The message will be deleted on the sender side only when it is deleted on the receiver side. Depending on your app logic, you can use one or all three intervals. If you use multiple intervals, the message will be deleted whenever the first interval reaches.

Group Messaging

The disappearing messages can be used with both one-to-one and group messages. For a group message, the timer is triggered after all recipients have received or read it.

Note that, your users may take screenshots of the message. Hence for added security, you may want to disable screen capturing in your app when disappearing messages are visible.

Get Age at Receiver Side

The recipient can find the age of the message by calling

  • getAge() to know the age in seconds after which the message will be deleted

The return value is zero (0) if the age was not set.

messaging, group messaging, disapppearing messages