name = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId());
name = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(fragmentActivity).getUserId());
public void updateTitle() { StringBuffer stringBufferTitle = new StringBuffer(); if (contact != null) { stringBufferTitle.append(contact.getDisplayName()); } else if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { String userId = ChannelService.getInstance(getActivity()).getGroupOfTwoReceiverUserId(channel.getKey()); if (!TextUtils.isEmpty(userId)) { Contact withUserContact = appContactService.getContactById(userId); stringBufferTitle.append(withUserContact.getDisplayName()); } } else { stringBufferTitle.append(ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(getActivity()).getUserId())); } } if (stringBufferTitle != null && getActivity() != null) { setToolbarTitle(stringBufferTitle.toString()); } }
public void updateChannelTitle() { if (!Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { Channel newChannel = ChannelService.getInstance(getActivity()).getChannelByChannelKey(channel.getKey()); if (newChannel != null && !TextUtils.isEmpty(channel.getName()) && !channel.getName().equals(newChannel.getName())) { title = ChannelUtils.getChannelTitleName(newChannel, MobiComUserPreference.getInstance(getActivity()).getUserId()); channel = newChannel; if (getActivity() != null) { setToolbarTitle(title); } } } }
myholder.contactImage.setImageResource(R.drawable.applozic_group_icon); myholder.smReceivers.setText(ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId())); myholder.alphabeticTextView.setVisibility(View.GONE); myholder.contactImage.setVisibility(View.VISIBLE);
public String getNameForInviteDialog() { if (contact != null) { return contact.getDisplayName(); } else if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { String userId = ChannelService.getInstance(getActivity()).getGroupOfTwoReceiverUserId(channel.getKey()); if (!TextUtils.isEmpty(userId)) { Contact withUserContact = appContactService.getContactById(userId); return withUserContact.getDisplayName(); } } else { return ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(getActivity()).getUserId()); } } return ""; }
title = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId()); notificationIconBitmap = appContactService.downloadGroupImage(context, channel);
isUserPresent = ChannelService.getInstance(this).processIsUserPresentInChannel(channelKey); if (channel != null) { String title = ChannelUtils.getChannelTitleName(channel, userPreference.getUserId()); if (!TextUtils.isEmpty(channel.getAdminKey())) { contact = baseContactService.getContactById(channel.getAdminKey());
/** * This method returns the receiver's name from the message object that this instance holds currently. * * @return If the message belongs to group it will return group's name and if it belongs to user, the display name of the user will be returned. */ public String getReceiver() { if (message.getGroupId() == null) { return contact.getDisplayName(); } else { if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { Contact withUserContact = contactService.getContactById(ChannelService.getInstance(context).getGroupOfTwoReceiverUserId(channel.getKey())); if (withUserContact != null) { return withUserContact.getDisplayName(); } } else { return ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId()); } } } return null; }