Search in sources :

Example 6 with AnimationContent

use of im.actor.core.entity.content.AnimationContent in project actor-platform by actorapp.

the class SenderActor method doSendAnimation.

public void doSendAnimation(Peer peer, String fileName, int w, int h, FastThumb fastThumb, String descriptor, int fileSize) {
    long rid = RandomUtils.nextRid();
    long date = createPendingDate();
    long sortDate = date + 365 * 24 * 60 * 60 * 1000L;
    AnimationContent animationContent = AnimationContent.createLocalAnimation(descriptor, fileName, fileSize, w, h, fastThumb);
    Message message = new Message(rid, sortDate, date, myUid(), MessageState.PENDING, animationContent);
    context().getMessagesModule().getRouter().onOutgoingMessage(peer, message);
    pendingMessages.getPendingMessages().add(new PendingMessage(peer, rid, animationContent));
    savePending();
    performUploadFile(rid, descriptor, fileName);
}
Also used : PendingMessage(im.actor.core.modules.messaging.actions.entity.PendingMessage) ApiTextMessage(im.actor.core.api.ApiTextMessage) Message(im.actor.core.entity.Message) ApiDocumentMessage(im.actor.core.api.ApiDocumentMessage) RequestSendMessage(im.actor.core.api.rpc.RequestSendMessage) ApiMessage(im.actor.core.api.ApiMessage) ApiJsonMessage(im.actor.core.api.ApiJsonMessage) AnimationContent(im.actor.core.entity.content.AnimationContent) PendingMessage(im.actor.core.modules.messaging.actions.entity.PendingMessage)

Aggregations

AnimationContent (im.actor.core.entity.content.AnimationContent)6 DocumentContent (im.actor.core.entity.content.DocumentContent)5 PhotoContent (im.actor.core.entity.content.PhotoContent)5 FileRemoteSource (im.actor.core.entity.content.FileRemoteSource)4 VideoContent (im.actor.core.entity.content.VideoContent)4 FileLocalSource (im.actor.core.entity.content.FileLocalSource)3 VoiceContent (im.actor.core.entity.content.VoiceContent)3 ApiDocumentMessage (im.actor.core.api.ApiDocumentMessage)2 ApiJsonMessage (im.actor.core.api.ApiJsonMessage)2 ApiMessage (im.actor.core.api.ApiMessage)2 ApiTextMessage (im.actor.core.api.ApiTextMessage)2 ContactContent (im.actor.core.entity.content.ContactContent)2 LocationContent (im.actor.core.entity.content.LocationContent)2 StickerContent (im.actor.core.entity.content.StickerContent)2 TextContent (im.actor.core.entity.content.TextContent)2 PendingMessage (im.actor.core.modules.messaging.actions.entity.PendingMessage)2 Uri (android.net.Uri)1 FrameLayout (android.widget.FrameLayout)1 JsArrayString (com.google.gwt.core.client.JsArrayString)1 ApiDocumentEx (im.actor.core.api.ApiDocumentEx)1