I need a chat component for my mobile app.
Chat loads upon an XML-Request (lets say ). You will get an XML-Document from me, which has the following structure:
1283 < that’s the userid who opens the chat (I don’t know if you need it, but I thought it would be helpful)
128391823 (where either sender or receiver equals to the )
1 or 0
Then the component has to load this xml string and displays the users messages RIGHT and the “other” friend message in the left (like it is on facebook and whatsapp messenger). Do you have an idea how to get chats via XML in (near) realtime, I’m not sure if sockets work for this case?
If I push the “send” button it should automatically submit the message to an url (Send data via POST) (let’s say ) AND display it in the chat itself.
Messages should then stored LOCALLY (sqlite?) and should load again if I open the chatwindow with userXY. All new messages should be displayed at the bottom not in the top. If the locally loaded messages are displayed (I think we need a best practice here to not show ALL messages, just say the last 30messages…), a new request is made to to get all new messages.
Sometimes we could have duplicates, so I added the “isread” node to the xml file. I will, on each request, set it to 1 for each message, so you can check on the clientside if the message was already delivered and has not to be shown.
2 freelancers are bidding on average $533 for this job
I can do this for you. However you would need a server to make this application scalable. Also socket would be the best approach. Is this for web,desktop or mobile. Kindly contact me and lets talk more.