linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] LinphoneChatRoom PeerAddress is not getting up


From: Sylvain Berfini
Subject: Re: [Linphone-developers] LinphoneChatRoom PeerAddress is not getting updated
Date: Thu, 18 Jun 2015 09:55:30 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

Hi Yonatan,

You will only get a displayName if the SIP address used to create the chatRoom contains one.
Your problem is you don't set the displayName when creating the chatRoom, you set it on a variable you get once it has been created (and not on the chatRoom itself).

Here's how to do that:
LinphoneAddress addr = LinphoneCoreFactory.instance().createLinphoneAddress(destination);
addr.setDisplayName(name);
LinphoneChatRoom room = core.getOrCreateChatRoom(addr.asString());

Cheers.
Sylvain Berfini
Software Engineer @ Belledonne Communications
Le 17/06/2015 09:27, Yonatan Nir a écrit :
Someone?





I'm trying to create a new LinphoneChatRoom using this code:

public void createNewChatRoom(String destination, String name)
    {
        LinphoneChatRoom[] rooms = core.getChatRooms();
        for (LinphoneChatRoom room : rooms)
        {
            Log.d("name1: " + room.getPeerAddress().getDisplayName());
        }
        LinphoneChatRoom room = core.getOrCreateChatRoom(destination);
        if (room != null)
        {
            room.getPeerAddress().setDisplayName(name);
        }
        rooms = core.getChatRooms();
        for (LinphoneChatRoom room2 : rooms)
        {
            Log.d("name2: " + room2.getPeerAddress().getDisplayName());
        }
    }

During the first iteration on the rooms (name1 iteration) all of the display names I'm getting are null. At the second iteration over the rooms (name2 iteration), There is indeed a new room that was added and the array is +1 in size, but again, all the display names are null even though I just set it.
Why is this happening?


_______________________________________________ Linphone-developers mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/linphone-developers
!DSPAM:5581216b17625645616360!

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


!DSPAM:5581216b17625645616360!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]