Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,777,659 Members 44,368 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to get enable Google's gesture typing in AOSP keyboard

Tip us?
 
jazzor
Old
#1  
Member - OP
Thanks Meter 136
Posts: 51
Join Date: Mar 2010
Default [GUIDE] How to get enable Google's gesture typing in AOSP keyboard

This is meant to be a guide for people interested in building AOSP based roms and is strictly for developers only. If you wish to have gesture typing in your rom the most simple way is to include/install "LatinImeGoogle.apk".

Not everyone wants to always use google's stock input apk, particularly if you have made modifications into AOSP latinime keyboard if your own and want it to propagate through to your roms without sacrificing gesture input (which i have found is quite useful). Well after some digging around there's good news and bad news.

The good news is that the gesture typing is already in the source tree on the java side and can be enabled by changing packages/inputmethods/LatinIME/java/res/values/gesture-input.xml or using the overlay in devices/../mako (not within scope of this post).

Code:
<bool name="config_gesture_input_enabled_by_build_config">true</bool>
However, just changing the value you will notice that it will draw the gesture but list no words. Thats because google didnt include the "gesture decoder" in the AOSP sources because it is super secret. You can see the code stubs in the C++ part of latinime under native/jni/src/gesture/* .

As a result, libjni_latinime.so will not contain code to decode the gestures and will not read from the dictionary.

BUT! There is a way! You can drop in replace the lib from "LatinImeGoogle.apk" into your system/lib and you will have your gesture decoder!

The library inside the apk is called "libjni_latinimegoogle.so" under /lib/<arch_type>/ inside the apk. You can extract this library from within android using program like root explorer and on PC using android apktool (http://code.google.com/p/android-apktool/). Rename this shared library to "libjni_latinime.so" to replace the AOSP built one and it will decode the gestures through the AOSP based keyboard.

Enjoy!
The Following 16 Users Say Thank You to jazzor For This Useful Post: [ Click to Expand ]
 
cj360
Old
(Last edited by cj360; 23rd December 2012 at 03:10 AM.)
#2  
cj360's Avatar
Senior Member
Thanks Meter 672
Posts: 1,292
Join Date: Oct 2011

 
DONATE TO ME
-removed-
 
kabir_sharma009
Old
#3  
Junior Member
Thanks Meter 7
Posts: 27
Join Date: Nov 2009
Location: Delhi
Thanks for sharing the detailed instructions. This was a major annoyance..
The Following User Says Thank You to kabir_sharma009 For This Useful Post: [ Click to Expand ]
 
TheLastRebel1123
Old
(Last edited by TheLastRebel1123; 25th April 2014 at 02:00 AM.)
#4  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Dec 2008
Quote:
Originally Posted by kabir_sharma009 View Post
Thanks for sharing the detailed instructions. This was a major annoyance..
I see you too have recently had an issue with this. I've followed everything, even using different sources for the libjni_latinimegoogle.so (noticed varing sizes) but none of them have worked for me. I installed the apk out of CM10.2.1, and the gesture trail shows up but still no library it seems. Any idea what I might have missed? Renamed file as directed and put in in the system\lib folder.

Thanks in advance for any help you may have to offer.

Edit:
Got it. Restart the phone...I feel like I should have called tech support

Re-Edit:
Negative, didn't realize at first it was set to Samsung Keyboard...Help still needed.
 
kabir_sharma009
Old
#5  
Junior Member
Thanks Meter 7
Posts: 27
Join Date: Nov 2009
Location: Delhi
Quote:
Originally Posted by TheLastRebel1123 View Post
I see you too have recently had an issue with this. I've followed everything, even using different sources for the libjni_latinimegoogle.so (noticed varing sizes) but none of them have worked for me. I installed the apk out of CM10.2.1, and the gesture trail shows up but still no library it seems. Any idea what I might have missed? Renamed file as directed and put in in the system\lib folder.

Thanks in advance for any help you may have to offer.

Edit:
Got it. Restart the phone...I feel like I should have called tech support

Re-Edit:
Negative, didn't realize at first it was set to Samsung Keyboard...Help still needed.
I've attached the file in .rar format for you, extract the .so file from the archive using WinRAR and replace the existing file in System/Lib with this one.

You might get an error while trying to replace the file if AOSP Keyboard is selected as default input method, so switch to another keyboard before replacing the file (Swype Keyboard Trial is what I used).
Attached Files
File Type: rar libjni_latinime.rar - [Click for QR Code] (178.2 KB, 108 views)
 
TheLastRebel1123
Old
#6  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Dec 2008
Thanks for getting back to me. Unfortunately it additional didn't work. Any other ideas?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes