how to notify to user1 to user2 for come in private chat ?

0 votes
i am creating chat application in which i want to notify user when other user want to do privatechat with other user. so can you please tell me how can i notify user2 when user1 send private chat invite ? i have used sendPrivateChat method to do private chat between user. please reply me. Thanks in advance.
asked Oct 3, 2016 in Android by bhavesh (16 points)

1 Answer

0 votes
Hi Bhavesh,

If you want to send invitation for private chat only when user in connected to AppWarp then you can use sendPrivateChat API. You can define message type and associate it along with message in sendPrivateChat. When the chat received at other end, you can check the message type to check if it is a normal message or a invite. If it is a invite then you can process it as invitation request. Once user accepts this request then you callsenPrivateChat API for the acknowledgement to the first user. Once the first user gets invitation acceptance acknowledgement then bith the users can start chatting.

Please let me know if you have any other queries.

Regards,

Rajeev
answered Oct 4, 2016 by rajeev.etc (1,660 points)
can you please tell me how to can define message type and how to associate it along with message in sendPrivateChat. ?
You can create a JSON string which can have keys such as messageType, message etc. You can parse the JSON string at client side to get the type and message.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...