Unable to see default android emoji in textview of my android app -


i developing text messaging android app , when sending text message android keyboard emoji , recieving in android mobile showing ?? (double question mark). how can able see emoji in textview?

like below appending text message

holder.chattext.settext(tempvalues.getmessagetext()+" \n "); 

and sending message server below

 public class syncpendingmessagetoserver extends asynctask<string, void, boolean> {     protected void onpreexecute() {         //doshowloading("please wait");     }      protected boolean doinbackground(string... params) {         if(config.isinterneton(getapplicationcontext())  && loginuserinfoid == "") {             list<chatmessage> allchatmessage = db.getallmessage();             (chatmessage chatmessage : allchatmessage) {                  if (chatmessage.getispending() == 1 && chatmessage.getmediamimetype().isempty()) {                     string msgtext = chatmessage.getmessagetext();                      httpclient myclient = new defaulthttpclient();                     httppost myconnection = new httppost(config.host_name + "/androidapp/sendmessage");                      try {                         list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2);                         namevaluepairs.add(new basicnamevaluepair("messagetext", msgtext));                         namevaluepairs.add(new basicnamevaluepair("senderuserinfoid", chatmessage.getsenderuserinfoid()));                         namevaluepairs.add(new basicnamevaluepair("recieveruserinfoid", chatmessage.getreceiveruserinfoid()));                         namevaluepairs.add(new basicnamevaluepair("messagethreadid", chatmessage.getoriginalmsgthreadid()));                         namevaluepairs.add(new basicnamevaluepair("url", ""));                         namevaluepairs.add(new basicnamevaluepair("filetype", ""));                          if(chatmessage.getispendingtoupdate() == 0) {                             namevaluepairs.add(new basicnamevaluepair("msgtype", ""));                         }                         if(chatmessage.getispendingtoupdate() == 1) {                             namevaluepairs.add(new basicnamevaluepair("msgtype", "group"));                         }                          myconnection.setentity(new urlencodedformentity(namevaluepairs));                         myclient.execute(myconnection);                      } catch (clientprotocolexception e) {                         toast.maketext(getapplicationcontext(), "message sending failed!", toast.length_long).show();                         //e.printstacktrace();                     } catch (ioexception e) {                         //e.printstacktrace();                     }                 }             }             db.updatesyncedmessage();         }         return true;     }      protected void onpostexecute(boolean status) {         //do whatever want in method         final handler handler = new handler();         handler.postdelayed(new runnable() {             @override             public void run() {                 new syncpendingmessagetoserver().execute();             }         }, 200);     } } 

android has support of emoji starting 4.4. vendors built-in emoji in previous versions of android, can't rely on it.
best choice use library allows show emoji in text views, emojicon 1 of them.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -