Best Alarm App for Android?

There are tons of choices to choose from when looking for a great alarm app for Android. While the stock … more

Unofficial CM12.1 Available for Moto E 2014

While Motorola is yet to release a final 5.0.2 build for the Moto E 2014, XDA Senior … more

Pinsy Brings Social Sketching To Your Watch & Phone

Did you watch Apple’s VP draw on his wrist during the Apple Watch announcement … more

CyanogenMod 12.1 for Samsung Galaxy S5

Android 5.1 is slowly putting its mark in the custom ROM world. CyanogenMod 12.1 is available to … more
Post Reply Subscribe to Thread Email Thread

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

25th November 2012, 10:50 AM   |  #1  
OP Member
Thanks Meter: 142
 
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, 05:12 PM   |  #2  
cj360's Avatar
Senior Member
Thanks Meter: 702
 
1,312 posts
Join Date:Joined: Oct 2011
Donate to Me
More
-removed-
Last edited by cj360; 23rd December 2012 at 03:10 AM.
21st April 2014, 11:46 PM   |  #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, 01: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 02:00 AM.
26th April 2014, 10: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, 411 views)
27th April 2014, 03: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