DoubangoTelecom / imsdroid

High Quality Video SIP/IMS client for Google Android
https://doubango.org
Other
294 stars 168 forks source link

GetName from sip #620

Open marwensniper opened 5 years ago

marwensniper commented 5 years ago

Hi,

How can i get the name of caller when he's incall.

mSession.getRemotePartyDisplayName() give me only the number.

Thx

SamarthaKV29 commented 4 years ago

Try something like this: We had to make our own utility functions - To retrieve Contacts. Maybe you need to make your own.

image

mSession.getRemotePartyDisplayName() give me only the number. This is correct, because as long as its not a contact, you will get only URI or number in this case. However you could probably use this function too:

mDisplayName = NgnUriUtils.getDisplayName(getRemoteParty());

This will give you a contact name if it exists, or else just the uri. You can only get the name of the caller if he is a contact. If he is, use the above to get his name.