0

I am able to establish 1-1 chat by creating a room. I have used room because I will get history of last 50 messages (I would prefer more in number with paged results and expecting this feature in the near future).

  1. I am unable to figure out how I can implement image and video sharing in between the text chat.

  2. I also want this in the history I get. I mean I need to get the order of the text/image/video along with their details to display to the user.

When I upload an image file using Content module, the files are saved in a separate table in contents section (which is fine for user's gallery kind of app). But for chat we need to know who sent to whom and what (image/video/text).

I would like to know whether this is possible with the current version of the Quickblox sdk. or else is there any way we can establish this using Custom objects module? If possible, will this work if there are more number of users in the room? Please give me a solution to this.

Revanth
  • 113
  • 12
  • Possible duplicate of [QuickBlox :How to share image/video in peer to peer chat module?](http://stackoverflow.com/questions/13605664/quickblox-how-to-share-image-video-in-peer-to-peer-chat-module) – Badal Shah Jan 26 '16 at 09:08

1 Answers1

1

If you want create chat with content, you need to use a Custom Objects. (in current QB version).

Advantage - you can also get chat history and implement deleting of message history.

But this method doesn't very simply.

At first you need create Custom objects represented next things:

  • single chat message
  • group chat message
  • (may be need create extended user profile)

At first, you can use QBChat module for changing service information between users.

When you need send message, you create Custom Object (CO) - message with parameters and upload it. When it uploading, you send service message via QB chat to your opponent user. When opponent will receive it, he should perform request for updating CO (in this case - single message).

As example, single chat message can contain next parameters:

  • opponent qb user id;
  • owner qb user id;
  • message text;
  • link to content;

Sending of content message divide to next steps: At first, you need upload content file using Content module, and after this create message CO, upload it on server and send service message to your opponent

frankWhite
  • 1,523
  • 15
  • 21