Simple chat application using listview in android

  • asadkhan

    Hi, First of All great work. you saved me a lot of time.
    I have a quick question though. How can I specify a predefined message on the chat screen. I mean when I open the chat page, It shows me a message like “hi there”.
    I would appreciate your help.

  • mhd adeeb masoud

    Thanks a lot that really helped me

  • Marwa

    very helpful thanks! but can u provide me with code if I want to connect two users i am a beginer and I am not sure how to do it

  • dom

    Hey!! This code is great thanks so much for sharing it! For some reason my messages get sent without the textview.xml attributes to make the bubble around it. I have exactly what you have in textview.xml stored in my drawable folder, but don’t see it being referenced anywhere the the left and right messages… am I missing something?

    Also could you provide insight on how to have all messages send on the right side? Anything helps! Thanks in advance!!!! 😀

  • naveen besamalla

    thank u soo much.Most helpful code ever.Made me easy to understand and gave me solution easily.
    Great work.

  • Kevin Moses Kenap

    Do you have tutorial part 2 chat application?

  • Kevin Moses Kenap

    Bro, Can you make tutorial how to get recieve message from destination user chat?

  • Hi Brandon, I only came across this thread now. But if it’s any help just duplicate this code:

    chatArrayAdapter.add(new ChatMessage(side, sMessage));
    side = !side;

    If you wish to specify which side to display the message on then change “!side” to “true” for left and “false” for right.

Trinity tuts is one of the best place for beginners to learn android, php, google and web design tutorial and tips. - Maintained by Aneh Thakur
Subscribe to Blog via Email

Join 3,874 other subscribers