Android Question Detect currupted Emoji

Pooya1

Active Member
Licensed User
Hi
According to below shot
photo_2018-08-01_14-45-02.jpg

I have 1024 emoji in my database and try show it in my app
Some emoji is corrupted or not valided
I need remove this emoji from scrollview's list
How detect it?

Note:
Because i save emoji's code string in database,so i convert it to int and use UTC function for show emoji
 

MarkusR

Well-Known Member
Licensed User
Longtime User
i guess its not supported by your used unicode font.
maybe you can check the output as image and compare it with this crossed-rectangle, or just how much colors one emoji pic output have.
in database you can set a flag for it.
 
Upvote 0

Pooya1

Active Member
Licensed User
i guess its not supported by your used unicode font.
maybe you can check the output as image and compare it with this crossed-rectangle, or just how much colors one emoji pic output have.
in database you can set a flag for it.
Yes i prefer delete unsupported emoji instead if check Emoji's code
Thanks
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i not really like images deduced from "id" because some fonts have different meanings.
u need to be sure if people write in a chat that they use both the same font.

if you replace keyword like :heart: :love: :happy: by icon you are more safe.
 
Upvote 0

Pooya1

Active Member
Licensed User
i not really like images deduced from "id" because some fonts have different meanings.
u need to be sure if people write in a chat that they use both the same font.

if you replace keyword like :heart: :love: :happy: by icon you are more safe.
I think it is not necessary use image or other font
Android have default all Emoji
Example 0xF600 is same in all device
Unfortunately after corrupted emoji from database,all emoji not show in some device
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
how can a text like "0xF600" get corrupted in your database?

from android version to other version there are more or less Emojis. means at old devices some new Emojis did not exist.
 
Upvote 0

Pooya1

Active Member
Licensed User
how can a text like "0xF600" get corrupted in your database?

from android version to other version there are more or less Emojis. means at old devices some new Emojis did not exist.
I try use 0x1F900 To 0x1F9FF and other code in app without database now
But this code have undetected emoji
How do can i detect it?
With canvas or api version?
 
Upvote 0

Pooya1

Active Member
Licensed User
Finally i use below emoji codes that is same in all android version

B4X:
Dim EmojiList As List
EmojiList.Initialize
    
    Dim j As Int
    
    For i = 128512 To 128591
        EmojiList.Put(j,i)
        j = j + 1
    Next

    For i = 127744 To 127777
        EmojiList.Put(j,i)
        j = j + 1
    Next
    
    For i = 127780 To 127891
        EmojiList.Put(j,i)
        j = j + 1
    Next
    
    For i = 128000 To 128317
        EmojiList.Put(j,i)
        j = j + 1
    Next

Use this codes in app
 
Upvote 0
Top