3

I want to check if an emoji is supported by a different device or not. See below screenshot:

enter image description here

Here you are able to see some of the emoji that are not supported by device so how can I check wether device is able to show that image or not?

I'm able to check condition on >=23 api level means paint.hasGlyph() using hasGlyph() is return true or false if emoji is supported or not.

But how can I check this things below 23 api level?

David Walschots
  • 12,279
  • 5
  • 36
  • 59

1 Answers1

0

You could draw the emoji on a Canvas and then compare the pixels to the "frame with X" i.e. a character that you already know does not exist. It's a easy to code but probably heavy on the CPU. I'm doing something similar in Python and if you do it once with all the emoji you use and save the results, the speed is acceptable.

cuzi
  • 978
  • 10
  • 21