Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.42k stars 96 forks source link

Implement alternative emoji vendors packs (Twemoji, Openmoji, even JoyPixels) #297

Open Twilightssuperb opened 11 months ago

Twilightssuperb commented 11 months ago

Remind about my issue from Openboard tracker.

Is your feature request related to a problem? Please describe.

At older devices some latest emojis are not available. I can' type them, so I forced to switche to another keyboard or copy/paste emojis from Telegram/WhatsApp

Describe the solution you'd like

Implement alternative emoji vendors - Twemoji, Openmoji, even JoyPixels.

Use case

Describe alternatives you've considered

EmojiCompat? But I'm not sure, is it better solution. https://developer.android.com/develop/ui/views/text-and-emoji/emoji2 https://developer.android.com/jetpack/androidx/releases/emoji2

Alternative emoji pack could be easier for implementation.

Additional context

It would bring full modern emoji support and independence from Android core version.

Anonymous2716 commented 11 months ago

Not all devices support those new emojis. I once tested with gboard. And it just appears as unknown characters. And not many apps support those emojis either.

Let's imagine a scenario where I have those emojis on my keyboard but the person on the other end don't. I have no way of knowing that. And no guarantee that the chat application will actually deliver this emoji as emoji bcs the character is unknown to it.

But yes it will be great to have these emojis as applications may support them in the future and maybe a toggle button would help to enable disable new emojis.

Helium314 commented 11 months ago

It would bring full modern emoji support and independence from Android core version.

Unfortunately it will only work for apps that don't rely on Android providing the emojis as @Anonymous2716 pointed out. The current implementation is that only emojis that are suppported by the Android version are shown. Showing all emojis, and using e.g. emojiCompat to make sure the are displayed correctly, will not work everywhere.

Though some show all emojis setting with an appropriate warning could be done.

Twilightssuperb commented 11 months ago

@Helium314, yep, I described my use case - copy/pasting missing newer emojis from WhatsApp/Telegram emoji keyboards is too tricky and unnecessary. I don't need to see newest emojis, it's not about your application, of course; I just want to be able to type them via your keyboard on older devices.

Helium314 commented 10 months ago

Adding all emojis (instead of skipping depending on Android version) is simple, especially now with the new keyboard parser.

What is necessary is to investigate how to make sure the emojis not supported by the Android version are shown, if possible in matching style (emoji style differs by Android version, and possibly by device manufacturer).

According to https://developer.android.com/develop/ui/views/text-and-emoji/emoji2, AppCompat supports showing newer emojis, but the described way of using an AppCompatActivity does not apply to a keyboard, as the shown view as far as I know doesn't have an associated activity.

Some investigation or a (draft) PR on this would be useful, I'm also curious how such a change affectsAPK size.