Closed Naguchennai closed 7 years ago
You need to subscribe to the room in order to get new messages. Code is
void subscribeMessage(){
room.subscribeRoomMessageEvent(new SubscribeListener() {
@Override
public void onSubscribe(Boolean isSubscribed, String subId) {
if (isSubscribed) {
System.out.println("subscribed to room successfully");
}
}
},this);
}
@Override
public void onMessage(String roomId, RocketChatMessage message) {
System.out.println("will receive new message here");
}
Doc is given here https://github.com/RocketChat/Rocket.Chat.Java.SDK/blob/develop/docs/ROCKETCHATDOC.md
I think link to all the docs is given in README file. Read it in total . :+1:
Lol Now only i know about this url https://github.com/RocketChat/Rocket.Chat.Java.SDK/blob/develop/docs/ROCKETCHATDOC.md
Thank you
How can i get Real time Message from From a particular Room? only room info? lol I think this is the only important and main part of this sdk.. i missed or u missed?