Don’t Fear Flashing with I Don’t Want You!

The XDA message boards are full of various modifications, with many of these helping … more

Quo Vadis, Open {Source, Standards, World}? w/ Jan Wildeboer – XDA:DevCon 2014

Open Source was a big topic at this years XDA:DevCon … more

Android 5.0 Leaked for the Samsung Galaxy Note 3

Android Lollipop is still making its way to many new devices. Firmware updates have been … more

Learn to Sync Files Between Android And PC with Unison

Dropbox and similar cloud services are great if youre planning to keep your files … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP jazzor

25th November 2012, 11:50 AM   |  #1  
OP Member
Thanks Meter: 140
 
51 posts
Join Date:Joined: Mar 2010
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: [ View ]
12th December 2012, 06:12 PM   |  #2  
cj360's Avatar
Senior Member
Thanks Meter: 700
 
1,311 posts
Join Date:Joined: Oct 2011
Donate to Me
More
-removed-
Last edited by cj360; 23rd December 2012 at 04:10 AM.
22nd April 2014, 12:46 AM   |  #3  
Junior Member
Flag Delhi
Thanks Meter: 7
 
27 posts
Join Date:Joined: Nov 2009
More
Thanks for sharing the detailed instructions. This was a major annoyance..
The Following User Says Thank You to kabir_sharma009 For This Useful Post: [ View ]
25th April 2014, 02:02 AM   |  #4  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Dec 2008
Quote:
Originally Posted by kabir_sharma009

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.
Last edited by TheLastRebel1123; 25th April 2014 at 03:00 AM.
26th April 2014, 11:08 PM   |  #5  
Junior Member
Flag Delhi
Thanks Meter: 7
 
27 posts
Join Date:Joined: Nov 2009
More
Post
Quote:
Originally Posted by TheLastRebel1123

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, 241 views)
27th April 2014, 04:51 PM   |  #6  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Dec 2008
Thanks for getting back to me. Unfortunately it additional didn't work. Any other ideas?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes