Giter VIP home page Giter VIP logo

Comments (18)

kykrueger avatar kykrueger commented on August 20, 2024 1

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.

  1. 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 calling startChatActivityForID(long threadId)

  2. 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

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

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

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

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

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

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

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

Hi Rohit,

It is not clear to me what activity you want to launch, could you clarify?

-- Kyle

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

Hello,

untitled

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.

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

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

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

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.

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

from chat-sdk-android.

bensmiley avatar bensmiley commented on August 20, 2024

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?

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

from chat-sdk-android.

rohitvairagkar avatar rohitvairagkar commented on August 20, 2024

from chat-sdk-android.

bensmiley avatar bensmiley commented on August 20, 2024

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].

from chat-sdk-android.

simonsmiley64 avatar simonsmiley64 commented on August 20, 2024

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

from chat-sdk-android.

geniuskrazy avatar geniuskrazy commented on August 20, 2024

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

from chat-sdk-android.

geniuskrazy avatar geniuskrazy commented on August 20, 2024

how can I create a Thread between two users ?

from chat-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.