Adding ChatSDK to an existing project
Hello,
I am trying to add ChatSDK to my existing project. It gets added but now how to access particular activities like signup, login, chat etc. on particular click or event.
Please help me.
Hello,
Are you looking to launch the activities we have developed as part of the sdk? if so, we use a HelperUtility. The class that this functionality is contained in may be found at
chat-sdk-android/sdk/src/main/java/com/braunster/chatsdk/Utils/helper/ChatSDKUiHelper.java
Let me know if this helps, -- Kyle
Hello Rohit,
I don't recommend this for the creation of a new chat, but for opening an existing chat. Use
startChatActivityForID(long id) from the above mentioned ChatSDKUiHelper.java. The id you are passing in will be from the BThread object. You can retrieve it from an instance of an existing BThread object with thread.getId().
-- Kyle
Hello Rohit,
I am wondering if you were able to launch the activity you are looking for with the suggestion. Also, if you are trying to launch the Chat SDK's login screen, or conversation/thread activity from your own UI.
-- Kyle
Hello Kyle,
I am not able to launch the activity I am looking for.... Please suggest me solution
Thanks & Regards, Rohit Vairagkar Mobile : 7620196168
On Sat, Jan 28, 2017 at 6:14 PM, Kyle Krueger [email protected] wrote:
Hello Rohit,
I am wondering if you were able to launch the activity you are looking for with the suggestion. Also, if you are trying to launch the Chat SDK's login screen, or conversation/thread activity from your own UI.
-- Kyle
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chat-sdk/chat-sdk-android/issues/4#issuecomment-275846313, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOj15L8PBzoXTZ4zbQklVOMR8KTyuOGks5rWzg6gaJpZM4LtQK_ .
Hi Rohit,
It is not clear to me what activity you want to launch, could you clarify?
-- Kyle
Hello,
I want to handle your login and signup activity in background with my activities.
Next I want to create chat user list automatically i.e. you are searching and then adding it to chat user list but i want it to do in background and directly showing list of users from firebase.
initially, i want to do this.
Thanks & Regards, Rohit Vairagkar
On Sat, Jan 28, 2017 at 8:00 PM, Kyle Krueger [email protected] wrote:
Hi Rohit,
It is not clear to me what activity you want to launch, could you clarify?
-- Kyle
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chat-sdk/chat-sdk-android/issues/4#issuecomment-275851226, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOj12l93k-7dmcpnx6h_WBfAkyaS0W5ks5rW1D6gaJpZM4LtQK_ .
Hello,

As shown in screen shot., you have provided these steps for ios.
But the same I want it for Android. can you provide. it.
I have done with ios...now I want it in android.
Please help.
Hi Rohit,
The API is indeed available for you to use, and we are working on our documentation alongside some refactoring. The chat SDK project is indeed open source, and that makes it possible for you to use our API to build a customized app, but hands on support for your project may require a quote.
However, I can help you with tips and try to point you to the right resources if you are doing it yourself. For doing the login from your own activities, take a look at how we handle the click of our login and register buttons in the ChatSdkAbstractLogin class. You could even extend this abstract logic class to the activity that you are adding your register and login buttons.
As for the user list, you should be able to retrieve the user's list of contacts with
if (DEBUG) Timber.d("Mode - Contacts");
sourceUsers = getNetworkAdapter().currentUserModel().getContacts();
Where getNetworkAdapter() is available in any activities and fragments that extend our base activities. If you are not extending our base activities, you will have to find a reference to the network adapter from when you initialized the chatSDK.
-- Kyle
Hello Rohit,
I was wondering if you have had any luck with this change.
In addition, if you need further special support or consulting help with you implementations, please consider our priority support packages. With this service we provide more hands on assistance with customizations.
Hello,
I had some luck but not perfect one.
I want to know that can we chat on different platforms i.e. android and ios, single firbase project contains 2 apps (one for android and other one is for iOS).
Is it possible? I have done it but whenever i send msg from android to ios or android to ios new thread is created. But there is no problem if I send msg on same platform.
Thanks & Regards, Rohit Vairagkar
On Tue, Feb 7, 2017 at 10:02 PM, Kyle Krueger [email protected] wrote:
Hello Rohit,
I was wondering if you have had any luck with this change.
In addition, if you need further special support or consulting help with you implementations, please consider our priority support packages http://chatsdk.co/downloads/priority-support-block/. With this service we provide more hands on assistance with customizations.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chat-sdk/chat-sdk-android/issues/4#issuecomment-278054954, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOj18-4boXD1XtYf174k35M7qpCseFBks5raJyagaJpZM4LtQK_ .
You can chat between iOS and Android. I've been testing it and it works fine. Maybe there is some issue in your configuration. When you say that each time you send a message, a new thread is created, can you explain further? If you have two users, A and B, and A sends B a message, we would expect a new thread to be created. Are you saying that if A then sends another message, yet another thread is created?
Can I login the user who signed up using iOS in android app?
and about chat suppose A added B as a contact and sends msg where A is android and B is iOS. Now B replies to this msg but at android side new thread is created and chat goes there.
and you said there may be some issue in my configuration. what is that? i didn't understand.
Thanks & Regards, Rohit Vairagkar Mobile : 7620196168
On Sat, Feb 11, 2017 at 9:55 PM, bensmiley [email protected] wrote:
You can chat between iOS and Android. I've been testing it and it works fine. Maybe there is some issue in your configuration. When you say that each time you send a message, a new thread is created, can you explain further? If you have two users, A and B, and A sends B a message, we would expect a new thread to be created. Are you saying that if A then sends another message, yet another thread is created?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chat-sdk/chat-sdk-android/issues/4#issuecomment-279157130, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOj19C1pJ7Owb0epA0iOEQjrDY7_wZXks5rbeEFgaJpZM4LtQK_ .
Hello,
How can I set Profile pic from my activity. I have image url and I want to set it to chatSDK's profile pic which is used in profile fragment, messages fragment.
Which method should I use?
Thanks & Regards, Rohit Vairagkar Mobile : 7620196168
On Sat, Feb 11, 2017 at 11:06 PM, Rohit Vairagkar <[email protected]
wrote:
Can I login the user who signed up using iOS in android app?
and about chat suppose A added B as a contact and sends msg where A is android and B is iOS. Now B replies to this msg but at android side new thread is created and chat goes there.
and you said there may be some issue in my configuration. what is that? i didn't understand.
Thanks & Regards, Rohit Vairagkar
On Sat, Feb 11, 2017 at 9:55 PM, bensmiley [email protected] wrote:
You can chat between iOS and Android. I've been testing it and it works fine. Maybe there is some issue in your configuration. When you say that each time you send a message, a new thread is created, can you explain further? If you have two users, A and B, and A sends B a message, we would expect a new thread to be created. Are you saying that if A then sends another message, yet another thread is created?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chat-sdk/chat-sdk-android/issues/4#issuecomment-279157130, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOj19C1pJ7Owb0epA0iOEQjrDY7_wZXks5rbeEFgaJpZM4LtQK_ .
To upload an image I'd recommend looking at the ChatSDKProfileHelper class and the saveProfilePicToServer method.
With regards to the issue with threads, can you provide me with access to the Firebase account so I can inspect the data? You should invite [email protected].
Hi @rohitvairagkar,
We have recently updated our documentation on how to add the Chat SDK to an existing project here. I would recommend watching the video and going through all the steps.
We have also included how to load the login activity. Hopefully this solves your problem.
We have also recently released the Android on the same Firebase path as the iOS one. This means you should be able to clone them both and test the messaging functionality. When we have done this the messaging works fine. It might be that there is a problem with your configuration, if you can confirm whether the base projects work together this is something we can look into further.
Finally, if you could raise new tickets for each issue this will allow us to keep each individual ticket for one specific problem. Hopefully you have solved the user profile problem but if not then raise a new ticket and we will help you solve it.
Simon
hi guys ! Thank you for all you have done, it's a wonderfull API, Congrat I'm looking to create a thread beetween two users by just using user informations like BUser. for example in my app i have some activity where u can see a user profile with his BUser informations, so i looking for a way i can create a thread between the two users with something like BUser mine = my buser informations BUser yours = the second buser informations creatThreadwith(yours){ .... } thank you for replying
how can I create a Thread between two users ?
Hello,
First I would like to ask that next time you create a new issue for questions, but I will answer here quickly.
If you want to create the thread between two users, you have two options.
-
Create the thread, but optionally open it later. This is done using the NetworkAdapter and the ChatSDKUiHelper. The methods you should call to do this are
createThreadWithUsers(String name, BUser... users)from the network adapter. Then callingstartChatActivityForID(long threadId) -
Create the thread and open the chat at the same time. This requires that the activity used to create and open the chat extends the ChatSDKBaseActivity. If your activity inherits this class, it may then call
createAndOpenThreadWithUsers(String name, BUser...users). This will result in opening the chat view that was configured when the ChatSDKUiHelper was initialized.
Hope this helps, -- Kyle