How to Solve Receiver getting blank emoji
How to Solve Receiver getting blank emoji
Guys really need help here solving this issue. I am running an android chat app everything is running file except the emoji. The emoji keyboard is ok all emojis are there on the sender side they are appearing on the chat screen BUT the recipient are getting blanks or weird characters. I am getting the emojis on the notification but when recipients opens up the message it just shows blanks or characters other than emoji. Why is this happening and what can I do to solve this? Iam using vanniktech library
This is my EmojiTextview
public class EmojiTextView extends android.support.v7.widget.AppCompatTextView
private int emojiSize;
public EmojiTextView(final Context context)
super(context);
int unicode = 0x1F60A;
public EmojiTextView(final Context context, final AttributeSet attrs)
super(context, attrs);
init(attrs);
public EmojiTextView(final Context context, final AttributeSet attrs, final int defStyle)
super(context, attrs, defStyle);
init(attrs);
private void init(@Nullable final AttributeSet attrs)
if (attrs == null)
emojiSize = (int) getTextSize();
else
final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.emoji);
try
emojiSize = (int) a.getDimension(R.styleable.emoji_emojiSize, getTextSize());
finally
a.recycle();
setText(getText());
@Override
public void setText(final CharSequence rawText, final BufferType type)
final CharSequence text = rawText == null ? "" : rawText;
final SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(text);
EmojiHandler.addEmojis(getContext(), spannableStringBuilder, emojiSize);
super.setText(spannableStringBuilder, type);
public void setEmojiSize(final int pixels)
emojiSize = pixels;
0
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
Welcome to SO. Could you describe your issue in more detail, please? E.g. by adding code, commands or screen shots which describe your problem. Please have also a look to the Help Center, especially for asking and minimal examples. Thanks.
– CKE
Sep 14 '18 at 12:06