I am trying to get the number of characters the emojis in my EditText have used up. The reason for this is my EditText has a maxLength of 25 chars.
I have looked at other examples of getting the count such as:
titleView.getText().toString()).length()
This counts each emoji as 2 characters so my input stops at 12 emojis = 24 characters.
The issue I am having is I think this count is off, my server is expecting to receive a string of no more than 25 chars so it must be truncating some of these emojis.
When I then go to retrieve this data in my app, it causes it to crash. My web service does not know how to handle it. It gets into the onSuccess callback, but when I try to query the response it says its a null object.
If each emoji is uniformly 2 chars long, why is this not working for me?
if they are not uniform, how to I get the real count?