Android Question Emoji


Active Member
Licensed User
Hi, I have the following query, how can I put in an string an emogi that contains two or more codes in hexadecimal example
The flag of Spain x 0x1f1ea ox1f1e6 when it is of a single code is no problem any idea?

Thanks in advance.

PS Sorry for the English


Licensed User
Did you try the Chr()s above, using the & operator to join multiple small Strings to be one large String?

If the flags are in the Unicode font used by the device to display the String then I am optimistic that it will work.
Upvote 0

Jeffrey Cameron

Well-Known Member
Licensed User
You're going to need to define what "didn't work for me" means. Is it not displaying the flag at all? If so then the font you're using may not support the Unicode characters you are trying to display (not all Unicode is universal).
Upvote 0


Licensed User
Thanks. It shows nothing.
Yep, I agree.

Unicode’s encoding of national flags is just crazy enough to work

I then thought perhaps it was more likely to to work on a PC than on a mobile device. Installed Google's Noto Emoji font downloaded from:

and in Chrome Settings, Customize fonts I set the Standard font to be Noto Emoji - make a note of the original setting, in case you need to set it back - then loaded this page:

and got this:


which is a step in the right direction. I tried using the colour version of the same font, but Windows 7 says it doesn't recognise that font format.

I suspect you will find that support for Unicode country flag characters/glyphs is still currently sporadic, and if you write your app based on this feature, then you will have many users without flags.

So you are probably better to use regular graphics at the moment. Wikipedia country entries might be a source of flag images. Or eg Spain, Australia (search for: flag image). Or this post points to an alternative and probably easier-to-access source of flag images and other country info.

B4X CharSequence type includes support for images, looks like it will do what you want but not via the (theoretically universal works-everywhere) Unicode method that you mentioned in this thread's first post.
Dim cs As CSBuilder
cs.Append("B4A: ").Image(LoadBitmap(File.DirAssets, "b4a.png"), 40dip, 40dip, False).Append(CRLF)
cs.Append("B4i: ").Image(LoadBitmap(File.DirAssets, "b4i.png"), 40dip, 40dip, False).Append(CRLF)
cs.Append("B4J: ").Image(LoadBitmap(File.DirAssets, "b4j.png"), 40dip, 40dip, False).Append(CRLF)
cs.Append("B4R: ").Image(LoadBitmap(File.DirAssets, "b4r.png"), 40dip, 40dip, False).Append(CRLF)
Label1.Text = cs
Upvote 0