Sorry this may sound like madness. So the main issue is that if my data from the web service is json_encoded then most emojis show up as squares in the app. Not all but most. I am trying to fix this on the web service side.
I found that if I do not use json_encode, the instead do something like:
$array .= '{"text":"emoji"}
echo = '[' . $array . ']';
Basically echoing it as if its json encoded. The emojis show up correctly in the app, but other things doing work properly because its not encoded. So what I figured out using mb_detect_encoding is that the text that has an emoji is UTF-8 and ones that don't have emoji are ASCII. So what I did is check that I can check and see if its not UTF-8 and if its not just json_encode the string. And if it is UTF-8 and do nothing to it. That works for 95% of all the data that is returned. Something like below.
$encode = mb_detect_encoding($theMemo);
if($encode != 'UTF-8'){
$theMemo = json_encode($theMemo);
}
$array .= '{"text":"' . $theMemo . '"}
echo = '[' . $array . ']';
The issue I am having is there are time such as when the text is something like "Floyd Mayweatherâ€@FloydMayweather #TheMoneyTeam" which has some unicode in it, but its not the emojis so I need to json_encode it for it to show up right.
Basicly I need to find a way to either json_encode anything that does not have a emoji in it or find a more proper way of going about this. I know what I am doing may seem odd, but I am just trying to find a solution, even if it seems like a hack.