element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

Built-in emoji support #819

Open cyphar opened 7 years ago

cyphar commented 7 years ago

Currently, you need to have an emoji keyboard installed in order to send emoji. Currently the riot-web client is planning on adding GitHub (or Slack) style :emoji:. This could work for Android, but we could also just follow how Signal handles it and add a button for inserting an emoji within the app. Also, on my phone the "enter" key is replaced by the "emoji" key inside Signal and the same doesn't happen on Android -- is there a chance we can set the same message entry flags to get emoji to be more prominent?

ylecollen commented 7 years ago

The android keyboard already has an emoji keyboard.

maxlinux2000 commented 7 years ago

...but as default the android keyboard don't have the emoji active, and the users, don't know (and don't want to know) how activate it.

So the best think to do is to have an emoticons/emoji/stickers picker, like whatsapp/telegram/skype... an so on. there are a lot of library that can be used... have a look here for ejample: https://github.com/kontalk/androidclient (emojicon)

ghost commented 7 years ago

What version of Android is this? My girlfriend bought a new Android (v6) phone and it definitely has the emoji button on the default Android keyboard.

vurpo commented 7 years ago

There is some flag (it appears to be android:inputType="textShortMessage") that can be set for the text box that makes the enter key on the keyboard change into an emoji button. This should be a trivial change to make in Riot.

ylecollen commented 7 years ago

textShortMessage will replace the Return key by the Emoji button. It is not the expected behaviour.

ghost commented 7 years ago

I actually meant that there is a separate emoji button on Android's default keyboard, to the left of the spacebar, as well as a Return key in the usual place. This emoji button is present on the keyboard when we tested it with Riot. (The emoji button is always present.)

So I am still curious which versions of Android do not have it.

eyelash commented 7 years ago

Samsung Galaxy Young 2, Android 4.4.2, there is no way to enter emojis: screenshot_2017-01-25-18-06-34

derWalter commented 7 years ago

lineageOS 14.1 (Android 7.1), no emoji button for riot present.

ylecollen commented 7 years ago

Press and Hold the Return button offers to display the emoji keyboard. http://www.wikihow.com/Get-Emoji-on-Android

eyelash commented 7 years ago

Press and Hold the Return button offers to display the emoji keyboard.

This doesn't work for me and when I press and hold the Gear button there is no emoji button in the menu that appears. I could probably install the Google Keyboard from the Play Store but I'd rather not install an extra keyboard just for Riot. Please note that WhatsApp, Telegram and Signal all have a built-in emoji button on my device.

hurzelmann commented 7 years ago

A built-in emoji picker for Riot Android would be great to attract new users. Most of "my users" complain it´s not so easy to add an emoji to a message (like in Whatsapp and that´s what people use and are comfortable with...)

smithfred commented 7 years ago

This was the first thing that came up for both me and someone I convinced to use Riot. In my case with stock Android 7.1.2 (AOSP keyboard) press and hold works; however this didn't work on the other person's phone.

Having no access to emoji is an immediately obvious deficiency likely to put off less technical/political "additional" users who aren't interested in the principles behind Matrix (i.e. friends and family mostly), and "install an entirely new/different keyboard" isn't going to cut it for them.

The barrier of "please install Yet Another IM App no-one else you know is using" is very high to begin with; it's great that the sign-up barrier is very low, but having a "it can't even do emoji" or "you have to install a different keyboard as well" is just going to get a "WTF is this S" reaction.

I'm not sure if having a pref somewhere for "show emoji selector by default instead of Return" that hooks into the textShortMessage flag will work for users for whom "long-press Return" doesn't work, but it's worth investigating. With that mode, Return is still available (on the Shift-ed layout).

Otherwise another emoji input mechanism will need to be implemented at some point for those users, realistically.

digititus commented 7 years ago

I'm trying to get our users away from Whatsapp for our in house communications and have started to implement matrix/riot. The biggest complaint is "where the emojis at?"

enannos commented 6 years ago

With Android 5, you have to install some extra packages with emojis. Would be nice if someone could implement it in the app

dkasak commented 6 years ago

Yes, this should be viewed as a must-have for wider adoption, unfortunately. Signal has a nice emoji selection UI so maybe have a look at that too?

heitorPB commented 6 years ago

Telegram, Whatsapp, Facebook Messenger, ..., they all have an emoji selection UI that works nicely for mobile/web/desktop. If you use in a mobile device, you also have the option for the emoji keyboard. I think this should be implemented for Riot-Android, Riot-Web and Riot-iOs. Maybe this discussion whould be in vector-im/riot-meta?

lascapi commented 6 years ago

Hi, I'm agre to add a built-in emoji support.

Firstly, because for now all my friends who use Riot don't know how they can do to add emoji in a message.

Second, and for me it's the main reason, because when I send an android style emoji, I don't want my friends receive iOs style or whatapp style. Because they are different and the meaning is not the same. Sometimes very different. I want to control what I send and what my friends will see. :-)

smithfred commented 6 years ago

when I send an android style emoji, I don't want my friends receive iOs style or whatapp style

This would necessitate Riot implementing its own entire emoji set (or adopting one platform's emoji and forcing that across all other platforms), which would just bring a different set of problems ("my emoji in Riot don't look like my emoji in my SMS app"), so it's not practical to solve this at a Riot/Matrix level.

It also would have zero effect in any other Matrix clients, or e.g. clients on bridged protocols (IRC etc.)

Applications like WhatsApp can implement their own style because they are walled gardens, and are designed to force the use of their first-party application only.

Emoji are characters with explicit meanings and/or descriptions, so the fundamental problem is each platform failing to capture the meaning of each emoji in their interpretations.

lascapi commented 6 years ago

Yes you're right, it's a complex problem.

One solution I see, I can send the picture of emoji I use in my message, like if is a normal embedded picture. Simple. So I can chose if I send Android or Twitter style and I'm sure my friend receive the good one.

It is not perfect...

Another one solution : we can simply tag the emoji UTF character with the style I use and the Matrix client in the other side restyle the emoji with the good one !

But, I think we need a solution for that. It's very important for the communication, and Riot is a tool to communicate. So... :-)

By the way, thank you at all the developers/designer to your work!

xoxys commented 5 years ago

Is there a reason why not adopting the behavior from riot-web and auto convert something like :) + space :p + space? https://github.com/vector-im/riot-web/issues/4554

vurpo commented 5 years ago

Because :) and :p are different things from all the emojis that exist, and since phones already have keyboards that can insert the various emojis that can be inserted into text, it would be redundant to have the app automatically change some character combinations into emojis (and also make it hard to input those specific character combinations without ending up with an emoji in your text, similar to the problems that Skype has had with this feature for years).

vurpo commented 5 years ago

Riot replacing the emoji font of the system with its own font across all apps would come with a lot of its own problems. It would mean that Riot needs to find that emoji set somewhere, and none of the freely available ones would satisfy everyone. Second of all, it would reinforce the (unfortunately common) belief that emojis are not a standard thing that exists in all text fields everywhere, but a "feature" that app developers have to add into their apps. This is why it is not uncommon to see someone asking Apple or WhatsApp or whomever to "add" an emoji to their apps, and if Riot does the same then the same will only continue (with future Riot users believing Riot's developers are responsible for what emojis can be sent through the app and what they represent).

bmarty commented 5 years ago

Also we may consider using what is described here: https://developer.android.com/guide/topics/ui/look-and-feel/emoji-compat

jluttine commented 5 years ago

@smithfred Maybe I'm missing something, but as far as I understand, I disagree with this: "This would necessitate Riot implementing its own entire emoji set".

Emojis are just Unicode symbols and the Riot built-in emoji keyboard could just output those unicode symbols similarly as the emoji keyboard in Android emoji keyboard if available. Riot definitely shouldn't implement its own entire emoji set. I can already see unicode emojis rendering just fine on my Riot client so emoji rendering is working already.

As far as I understand, this is how, for instance, Telegram works because I see the emojis sent from telegram with whatever client I use (e.g., riot, weechat), but the rendering depends on the font the client uses, of course. I suppose there are libraries that provide such unicode emoji keyboards for apps.

But I'm thinking I might be misunderstanding the problem here as I'm not really familiar with any of this stuff.

EDIT: I do agree that the "correct" solution is to use the emoji keyboard of the android itself, but for many users that's not available, so this would be a very much needed workaround.

svenb1234 commented 4 years ago

I also doubt that riot would have to implement its own emoji set. If you for example use Wire messenger on an older android release the emojis are different from those on a new android release. And the emojis are 1:1 the same as one gets them via the android keyboard although they are "opened" via a button in the wire UI rather than the keyboard. So IMHO there is no reason why riot should not make it as easy for its users as the other messengers all do.

lascapi commented 4 years ago

If you for example use Wire messenger on an older android release the emojis are different from those on a new android release.

This is the problem !! And on a UX design point of view it's a main trouble we need to fix ! So I don't agree with them !

Why ? Because messages are not the same in function of the environment. And it's not the way an application is expected to function. Imagine Riot introduces some bolds words or quote some of your sentences ....

Slack, Twitter, Facebook, Apple use their own emojis set ! Why ? Because they care about the user experience and not about the technical things.

Riot need to improve this. That why I think it's better ;)

Also, some new emoji aren't in the old Android/Windows/iOs devices. To have an emoji set would be a great solution ;)

jluttine commented 4 years ago

I still don't quite understand this wish for an emoji set, becase as far as I understand, Riot already renders emojis (if the client uses a font that supports those, I guess). So that works.

But what doesn't work well is inputting emojis when the phone doesn't have a built-in Android emoji keyboard. So, a built-in emoji keyboard would be nice to have. But it'd still just input unicode emojis, so each client can choose how to render those, and there's no need for a Riot emoji set.

Perhaps some standard Riot clients can use, for instance, OpenMoji (https://www.openmoji.org/) as a default to render the Unicode emojis. Especially if the client doesn't have emojis in its own font or some symbols are missing. But I don't think it makes sense to force the rendering of emojis to be exactly the same on all clients.. They're just unicode symbols, let everyone decide how they want to render them. If somebody wants to send an image that renders exactly the same way to everyone, then send some raster/vector graphic image instead of emoji.

ara4n commented 4 years ago

this issue is getting quite sidetracked.

maxlinux2000 commented 4 years ago

My answer is very simple. Look when users have whathapp and how many there are of Riot / Matrix ... and ask yourself why this difference, although both are free.

I don't care about the philosophy that Riot / Matrix programmers have, but it doesn't work at all. I have installed a matrix server and I have used the Riot client with my wife ... and it works very well ... but the interface is absurd and inefficient.

Now ask yourself why telegram has spread so much even though the server is not opensource at all.

On 12/8/19, Matthew Hodgson notifications@github.com wrote:

this issue is getting quite sidetracked.

  • We deliberately use the native emoji font on Android & iOS currently, mainly because it seems it seems to be the expected behaviour in general (e.g. twitter, facebook etc all use native emoji in their apps).
  • We already have our own emoji font which we use for cross-platform consistency on the web: it's a fork of Mozilla's Twemoji font: https://github.com/matrix-org/matrix-react-sdk/tree/develop/res/fonts/Twemoji_Mozilla
  • Yes, it might be nice to have an emoji keyboard in the Android app in case your version of Android doesn't give a nice one. We'll need it anyway for custom emoji & better sticker support.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/vector-im/riot-android/issues/819#issuecomment-562948649

lascapi commented 4 years ago

Ohhh !! Thanks @ara4n :) Sounds good !!

For the first point, I notice also :

WhatsApp, Facebook and Twitter use their own emoji images on Android, while Signal and Telegram for Android use Apple emoji images. ( https://emojipedia.org/google/ )

and

Facebook emojis appear for users of the Facebook website, Messenger for web, and Messenger for Android. Facebook apps for iOS and Android use native emojis for their respective platform instead of Facebook's own emoji images. ( like you said )

So it's not always the expected behaviour. (and I don't understand why facebook use Apple's emoji 🤔 but whatever)

And for an end user the main issue is : I want you see what I send.

Ok, I'm perfectionnist ^^ Thank you so much for Riot ❤️

svenb1234 commented 4 years ago

this issue is getting quite sidetracked.

  • We deliberately use the native emoji font on Android & iOS currently, mainly because it seems it seems to be the expected behaviour in general (e.g. twitter, facebook etc all use native emoji in their apps (at least on iOS)).
  • We already have our own emoji font which we use for cross-platform consistency on the web: it's a fork of Mozilla's Twemoji font: https://github.com/matrix-org/matrix-react-sdk/tree/develop/res/fonts/Twemoji_Mozilla
  • Yes, it might be nice to have an emoji keyboard in the Android app in case your version of Android doesn't give a nice one. We'll need it anyway for custom emoji & better sticker support.
  • We're never going to fix this in Riot/Android, but we will add it to the todo list for RiotX (which already has a basic emoji picker, used for picking reactions).

Maybe I misunderstood but there is one point missing:

Should riot offer a button in its GUI, e.g. within the input line, to open the keyboard's emoji section. Like a shortcut. AFAIK this is what e.g. Wire messenger or Hangouts does.

And this does not depend on whether riot ships its own emojis, keyboard etc.