Emoji Support for iOS and Android

南楼画角 提交于 2019-12-07 04:16:56

问题


I am trying to develop an application for both iOS and Android with emoji support in posts. Currently I am Base64 encoding and decoding the String (text &/ emoji) with UTF-8. It seems to work natively, Android-to-Android and iOS-to-iOS, but from Android -> iOS or iOS -> Android it doesn't always work. There are occasionally a few emojis missing, and the rest of the string (any actual text) is lost in these instances.

Note: I understand different devices have different emojis, so I am not as worried about occasional missing emojis, but the missing text bothers me, and I noticed a missing emoji on the same device.

Does anyone have any ideas or know of any better solutions? Thanks!


回答1:


I managed to figure it out. We are no longer encoding or decoding the string. Instead, I modified the TextView in Android to re-format the string so that both the text and the emojis display. I made a very simple library based on my solution. https://github.com/will5/EMOJITextView



来源:https://stackoverflow.com/questions/18135751/emoji-support-for-ios-and-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!