Package io.rong.message
Class GIFMessage
-
- All Implemented Interfaces:
public class GIFMessageGIF Message Class
This class represents a GIF message, which is stored and counted in the unread message count.
The default maximum size for a GIF file is 2 MB, as specified by RC_GIF_MSG_SIZE_LIMIT_EXCEED. The maximum GIF file size can be configured via navigation settings. getGifSizeLimit
-
-
Field Summary
Fields Modifier and Type Field Description public intwidthpublic intheightpublic longgifDataSizepublic final static Creator<GIFMessage>CREATOR
-
Constructor Summary
Constructors Constructor Description GIFMessage(Array<byte> data)
-
Method Summary
Modifier and Type Method Description intgetWidth()voidsetWidth(int width)intgetHeight()voidsetHeight(int height)longgetGifDataSize()voidsetGifDataSize(long gifDataSize)static GIFMessageobtain(Uri localUri)Creates a GIFMessage object. Array<byte>encode()voidwriteToParcel(Parcel dest, int flags)intdescribeContents()voidsetUpLoadExp(boolean upLoadExp)Sets whether the upload has failed. UrigetLocalUri()Retrieves the local image address (file:///). voidsetLocalUri(Uri localUri)Set the local image URI (file:///). UrigetRemoteUri()Retrieves the URL of the network image (http://). voidsetRemoteUri(Uri remoteUri)Sets the URL of the network image (http://). -
-
Constructor Detail
-
GIFMessage
GIFMessage(Array<byte> data)
-
-
Method Detail
-
getWidth
int getWidth()
-
setWidth
void setWidth(int width)
-
getHeight
int getHeight()
-
setHeight
void setHeight(int height)
-
getGifDataSize
long getGifDataSize()
-
setGifDataSize
void setGifDataSize(long gifDataSize)
-
obtain
static GIFMessage obtain(Uri localUri)
Creates a GIFMessage object.
- Parameters:
localUri- The path to the image
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
describeContents
int describeContents()
-
setUpLoadExp
void setUpLoadExp(boolean upLoadExp)
Sets whether the upload has failed.
- Parameters:
upLoadExp- Indicates whether the upload has failed.
-
getLocalUri
Uri getLocalUri()
Retrieves the local image address (file:///).
- Returns:
The local image address (file:///).
-
setLocalUri
void setLocalUri(Uri localUri)
Set the local image URI (file:///).
- Parameters:
localUri- The local image URI (file:///).
-
getRemoteUri
Uri getRemoteUri()
Retrieves the URL of the network image (http://).
- Returns:
The URL of the network image (http://).
-
setRemoteUri
void setRemoteUri(Uri remoteUri)
Sets the URL of the network image (http://).
- Parameters:
remoteUri- The URL of the network image (http://).
-
-
-
-