rocketchat / rocket.chat.java.sdk Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED, NOT MAINTAINED] Java/Android SDK for Rocket.Chat
License: MIT License
[DEPRECATED, NOT MAINTAINED] Java/Android SDK for Rocket.Chat
License: MIT License
When calling register guest function, the following error is thrown:
org.json.JSONException: JSONObject["token"] not found. at org.json.JSONObject.get(JSONObject.java:473) 2018-07-15 01:51:26.124 at org.json.JSONObject.getString(JSONObject.java:654) at io.rocketchat.livechat.model.GuestObject.<init>(GuestObject.java:21) INFO at io.rocketchat.livechat.middleware.LiveChatMiddleware.processCallback(LiveChatMiddleware.java:57) at io.rocketchat.livechat.LiveChatAPI.onTextMessage(LiveChatAPI.java:176) at io.rocketchat.common.network.Socket$1.onTextMessage(Socket.java:112) at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352) at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260) at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238) at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963) at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746) at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
P.S: I am using version 0.6.4, also on latest this issue reproduces
Add support to fetch the pinned messages list (paginated) in the SDK as a REST API.
I am trying to upload a fille using uploadFIle method it gives me upload error: ErrorObject{reason='Store not found', errorType='Meteor.Error', error=0, message='Store not found [invalid-store]'}
Hello,
I am trying to add this SDK in version 0.2.0 into Android project in gradle dependencies but I get 409 Conflict error.
There is how I am adding sdk:
compile ('io.rocketchat:rocketchatjavasdk:0.2.0'){
exclude group :'org.json', module: 'json'
}
Here is an error:
{
"errors" : [ {
"status" : 409,
"message" : "The repository 'oss-snapshot-local' rejected the resolution of an artifact 'oss-snapshot-local:io/rocketchat/rocketchatjavasdk/0.2.0/rocketchatjavasdk-0.2.0.pom' due to conflict in the snapshot release handling policy."
} ]
}
Version 0.1.1 works fine, I have tested also on fresh project with clear gradle cache.
Connect error
WebSocketException: The status line of the opening handshake response is empty
com.rocketchat.livechat:rocketchat-livechat:0.7.1
blow 0.6 working fine
We need to support the API to register a new user.
Documentation: https://docs.rocket.chat/developer-guides/rest-api/users/create.
I am trying to connect server using realtime api of rocket chat
i have used these server url
server url = wss://server.com/websocket
or
server url = wss://server.com
But in both case i have got this error :
Disconnected from server
Jan 10, 2018 10:51:47 AM com.rocketchat.common.network.Socket onConnectError
WARNING: Connect error
Please help me how can i connect to rocket chat server using real time api . What server url i need or any configuration in server needed .
When I do open an existent LiveChat support conversation, it loads the history after I send the first message and keeps loading. It does not subscribe to new messages.
Expected results:
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?
chatRoom.getChatHistory(20, new Date(), null, this);
@OverRide
public void onLoadHistory(List list, int unreadNotLoaded, ErrorObject error) {
System.out.println("onLoadHistory size = " + list.size());
}
above is the callback which was never called by Rocket Chat although messages are printed in the log by System.out. Any ideas?
Latest release is 0.7.1.9, doc and source is more like a mix version. You would find something different all the time 👍
Although you guys marked this as deprecated, the new library is still working in progress right? Please don't stop maintaining it.
Add support to fetch the starred messages list (paginated) in the SDK as a REST API.
Add Support to Register for Push Notification
I can't find a method for set users presence (online, offline).
I only find REST API method /api/v1/users.getPresence.
How can I set user presence?
We need to add the method to get the user channel list (subscriptions) via REST API.
We need to add the method to get the user group list (subscriptions) via REST API.
We need to add the method to send message via REST API.
in Room class, Type enum is not a public enum so checking room type is impossible
When saving the state of the room, and restoring it for sending another message to that room, it is interpreted as being a new room(A new entry with the same name is created in the rocketChat app)
This didn't reproduced in the 0.6.0 version.
Anyway, there is a very different/buggy behavior after 0.6.0 version...
We need to add the method to get the user DM list (subscriptions) via REST API.
When saving the object state, as described in the specs: String state=room.toString(); saveToFile("filename.txt",state);
the follwing exception is throwned:
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONObject.<init>(JSONObject.java:194) at org.json.JSONObject.<init>(JSONObject.java:321) at io.rocketchat.livechat.LiveChatAPI$ChatRoom.<init>(LiveChatAPI.java:240) at hello.chat.ChatService.onInitialData(ChatService.java:132) at io.rocketchat.livechat.middleware.LiveChatMiddleware.processCallback(LiveChatMiddleware.java:48) at io.rocketchat.livechat.LiveChatAPI.onTextMessage(LiveChatAPI.java:176) at io.rocketchat.common.network.Socket$1.onTextMessage(Socket.java:112) at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352) at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260) at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238) at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963) at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746) at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
The room.toString()
result looks lie this: ChatRoom{userName='guest-25', roomId='1jxze8nc7hs8h', userId='QciLCvpuMq2ZbimBb', visitorToken='-163d29c2d06bf5a4dc1915b4d9e34eeb', authToken='1LfwFzKYgsM3nphcV0EeY3jfnsp-9qBe6oPhRy01gtI'}
, but it should look like this:
{userName='guest-25', roomId='1jxze8nc7hs8h', userId='QciLCvpuMq2ZbimBb', visitorToken='-163d29c2d06bf5a4dc1915b4d9e34eeb', authToken='1LfwFzKYgsM3nphcV0EeY3jfnsp-9qBe6oPhRy01gtI'}
, in order to be successfully deserialized
Add support to fetch the files list (paginated) in the SDK as a REST API.
I want to insert livechat on my the core sample app.
Can I do that?
News user registerd via restapi Not possible Subscriptions or join room. not get getChatHistory. But it work Default main room but not work other Channel creted by admin.. If that user join using browser after only work in android
@OverRide
public void onLogin(TokenObject token, ErrorObject error) {
client.getSubscriptions(this);
}
@Override
public void onGetSubscriptions(List<SubscriptionObject> subscriptions, ErrorObject error) {
ChatRoomFactory factory = client.getChatRoomFactory(); //client.is used for creating rooms from subscriptions/ rooms retured by either getSubscriptions or getRooms API
room = factory.createChatRooms(subscriptions).getChatRoomByName("TestRoom");
}
How can user get private webrtc invite? need some function about webrtc
Separate the SDK into the modules and artifacts
livechat module - rocketchat-sdk-livechat artifact for LiveChat functionality
core module - rocketchat-sdk-core artifact for core SDK functionality, DDP protocol comunication.
common module - rocketchat-sdk-common artifact for common code used by both livechat and core modules.
We need to add the method to get the user subscriptions via REST API.
It is possible get list of online users? online users from specific room id or name?
The serverl can be connected,but the livechatsdk cannot be initialized.The error messsage is "Method not Found[404]"!
I'm using latest version of the demo LiveChat SDK and when I do rotate the device, it seems to reconnect to the server. This is unexpected and unnecessary, it only needs to adjust the UI, nothing else.
Add support to fetch the members list (paginated) in the SDK as a REST API.
Any plan about Core SDK? can we wait? how many days we need to wait? or jump any other?
I have added the compile line code in build.gradle to use this sdk. But still i doubt that all the sdk is imported. when i import any class its saying "cannot resolve symbol...".
Is there any way like we can build this sdk into a jar file or something and just copy it into the libs folder
Will this sdk still work with android studio 2.x versions?
I am using 2.2.x. can I use this sdk?
When a new user sends a message, and it is registered like this liveChat.registerGuest(username, email, departmentId, this);
the message is not broadcasted to all agents from that department, only to the last one added.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.