-
Notifications
You must be signed in to change notification settings - Fork 145
Picture Message
Tsubasa Nakayama edited this page Mar 16, 2017
·
1 revision
How to create picture message.
First, you need to create Bitmap instance you want to send.
Bitmap picture = BitmapFactory.decodeResource(getResources(), R.drawable.your_picture);
And then, set the picture when you create message.
Message message = new Message.Builder()
.setRightMessage(true)
.setMessageText("this text will not be shown")
.setUser(user)
.setPicture(picture) // Set picture
.setType(Message.Type.PICTURE) //Set Message Type
.build();
You need to set parameters by below two methods.
Message#setPicture(Bitmap)
Message#setType(Message.Type)