Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : How to programmatically open the soft keyboard in Emoji View

Tags:

As I see, a way to show default emojis on android is by using the following on an input text.

android:inputType="textMultiLine|textShortMessage"

When I search, I can't find a way to do this through Java. What I want to make happen is that when the soft keyboard is open, have the user tab a button to switch between emoji view and normal keyboard view.

Custom Emoji Keyboard.

I've already implemented this, but it would be much better to and lighter to use Emojis already on the device for post kik-kat.

Google does switch between this views.

On Google Allo, pressing the emoji icon inside the editText switch views.

like image 610
Relm Avatar asked Oct 13 '16 06:10

Relm


2 Answers

Maybe this will help you:

https://blog.swiftkey.com/tech-blog-android-input-method-subtypes/

There is something like an Emoji Subtype as you can see following the link below.

public static RichInputMethodSubtype getEmojiSubtype()

https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java

like image 86
Ben Avatar answered Oct 03 '22 22:10

Ben


TextView

Using TextView's input type does not contain what you want...

Keyboards

Seems you can show the user a list of available keyboards. (the ones that are available on that device)

And with that, see if it has an Emoji Key Board available. But needs at least Android 4.1 it seems.

Force Part of Key Board

Not possible as far as I can see. You can disable them, it seems.

*I would love to show how to do this, it looks like a neat thing to be able to do. But my google-fu does not show anything close :(

like image 28
Flummox - don't be evil SE Avatar answered Oct 04 '22 00:10

Flummox - don't be evil SE