In chat application i use emoji i am set it in edittext but while fetching it return an obj
EditText txt = (EditText)findViewById(R.id.edit_text);
ImageGetter imageGetter = new ImageGetter() {
public Drawable getDrawable(String source) {
try
{
Drawable d = getResources().getDrawable(value);
int size = txt.getHeight();
d.setBounds(0, 0, size, size);
return d;
}
catch(Exception e)
{
return null;
}
}
};
Spanned cs1 = Html.fromHtml("<img src='"+d+"' />", imageGetter, null);
txt.getText().insert(txt.getSelectionStart(), cs1);
this is how i set emoji in edittext. now issue comes while fetching text+emoji
TextView textView = (TextView)findViewById(R.id.textView1);
textView.setText(txt.getText().toString());
here i got text but not emoji it return obj