Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用unicode字符处理android中的笑脸_Android_Chat_Emoticons - Fatal编程技术网

如何使用unicode字符处理android中的笑脸

如何使用unicode字符处理android中的笑脸,android,chat,emoticons,Android,Chat,Emoticons,我正在开发一个即时消息应用程序。它工作正常。我使用compile'com.rockerhieu.emojicon:library:1.3.3'库在我的应用程序中添加了表情符号。当我从表情符号面板中选择表情符号时,它显示在视图中,其Unicode被发送到服务器并存储在数据库中。编码和解码使用compile'commons lang:commons lang:2.6库完成 编码: String message = edMessage.getText().toString().trim(); St

我正在开发一个即时消息应用程序。它工作正常。我使用compile'com.rockerhieu.emojicon:library:1.3.3'库在我的应用程序中添加了表情符号。当我从表情符号面板中选择表情符号时,它显示在视图中,其Unicode被发送到服务器并存储在数据库中。编码和解码使用compile'commons lang:commons lang:2.6库完成

编码:

 String message = edMessage.getText().toString().trim();
 String toServer = StringEscapeUtils.escapeJava(message);
解码

String messageReceived = StringEscapeUtils.unescapeJava(unicodeMessageReceived);

现在我在发送模式时遇到了问题,例如:-),:(.意思是如果我发送:-),它对应的图像应该显示出来。此时它是按原样显示的。我如何处理这里的模式?我如何查看对应于模式(例如:-)的图标并将其unicode存储在数据库中?

请检查此项以了解您的详细信息answer@GaganSingh ,我遵循了你提供的链接。但我仍然无法理解如何处理像:-)这样的模式。你能建议我更多的参考资料吗?我需要在我用来处理情绪的库中做一些更改吗?