[MOD] HTC_IME (8th June) v27: Small fix

Search This thread

jonasl

Senior Member
Nov 13, 2009
380
171
San Francisco, CA
Can confirm that. And I've got voice input in GERMAN now :D

Heh, didn't expect that. The HTC code explicitly tells the voice recognition service to use "DEFAULT_LANGUAGE". I supposed this was English, but I guess that it's based on your locale. Anyway, great news.

Yes this is aweseom!!! Could you please add the voice input button into the German keyboard layout as well?

It should be there in v5 for all keyboard layouts that is based on the English layouts. This was fixable by editing code. To enable it for all other layouts (German QWERTZ i guess is one of them) editing of binary xml is needed. I don't know how to do that. If someone does, please tell me and I'll show you exactly what must be done.


Edit: Updated first post regarding voice input button and update instructions:

To update from an older version of this mod keeping settings/user dictionary please use Linda File Manager (or other file manager that can reinstall apps) and select OK to the question about replacing application. Another option is "adb install -r HTC_IME.apk"
 
Last edited:

sputnik99

Senior Member
Aug 12, 2006
496
18
I don't know really. I've copied the Intents used to communicated with the recognizing service from the stock keyboard. It works for me and for some others... I double checked the error handling code. The errors shown in HTC keyboard comes directly from the Google recognizing service (error codes documented here). I guess you just have to keep trying. Maybe do a reboot to start everything over.



Version is now bumped to 5. I've removed the EN button when using other languages than English. Instead you get the voice input icon (long press for settings). Unfortunately I was unable to fix this for compact QWERTY, so if you use that and non English you will still get the EN button. Fixing this requires hacking binary layout xml and I'm not sure how to do that.

is both of it possible?

I really love the EN button on my german locale.
 

sixstring

Senior Member
Jan 2, 2009
141
22
Frankfurt
D&%$$ !! Now the German voice input stopped working. :mad:
Can anybody confirm that a reboot stops it ?

OK, uninstalled it and installed again. Now the German voice input is working again...strange.
 
Last edited:

rori~

Senior Member
Aug 21, 2009
4,209
820
Vienna
Heh, didn't expect that. The HTC code explicitly tells the voice recognition service to use "DEFAULT_LANGUAGE". I supposed this was English, but I guess that it's based on your locale. Anyway, great news......Edit: Updated first post regarding voice input button and update instructions:

[/I]

..updated to v5...I got eveything in english, settings, keyboard, locale,...but still, the keyboard doesn´t want speech input, pitty...

Edit: :) I rebooted, wifi off/on....and now speech worx !!!!!!!!!!!!! -cooool!!!

Edit2: is this a bug, or can I change it? -> it sends SMS twice :-(
 
Last edited:

JD82

Senior Member
Feb 1, 2009
178
60
www.anddev.it
I installed the version of modaco flashed from recovery. Now I would uninstall it to use this version, how can I do?

I used the following commands:
Code:
rm /system/app/HTC_IME.apk
rm /cache/dalvik-cache/system@app@HTC_IME.apk@classes.dex
rm /system/lib/libt9.so
The application no longer there, but I can not install the High resolution version (v5) (I also tried with Astro):

Code:
$ adb install HTC_IME.apk 1313 KB/s (4587207 bytes in 3.411s)
    pkg: /data/local/tmp/HTC_IME.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
$ adb install -r HTC_IME.apk 
1290 KB/s (4587207 bytes in 3.470s)
    pkg: /data/local/tmp/HTC_IME.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
 

NeidRider

Senior Member
Jan 26, 2009
98
9
Got it!

Do the following:

adb uninstall com.htc.android.htcime
then
adb install HTC_IME.apk
 
Last edited:

nDrg

Senior Member
Jan 30, 2010
209
0
Edinburgh
This installed without a hitch and is awesome! The stock keyboard was fine but after typing out a few sentences i can already see that this keyboard is much more accurate, i also love being able to add a new word to the user dictionary while typing! Thanks!!
 

NeidRider

Senior Member
Jan 26, 2009
98
9
Code:
$ adb uninstall com.htc.android.htcime
Failure
:(

Too bad... But it looks like it's not installed at all, then...
I had:
Code:
hal9001:~ markus$ adb uninstall com.htc.android.htcime
Success
hal9001:~ markus$ adb install HTC_IME.apk 
1283 KB/s (4587207 bytes in 3.490s)
	pkg: /data/local/tmp/HTC_IME.apk
Success

Before that I had also deleted the directory with the name com.htc.android.htcime in /data/app/data, if I remember right.
Perhaps this helped, too?
 

irishrally

Senior Member
Jun 13, 2009
3,386
524
California
This keyboard is nice but it really bothers me that when in the browser and you try to search for something, it assumes you are going to type a url so there is no spacebar key. Am I missing something here?
 

kd78

Senior Member
Feb 1, 2010
79
3
Arlington
This keyboard is nice but it really bothers me that when in the browser and you try to search for something, it assumes you are going to type a url so there is no spacebar key. Am I missing something here?

I find this annoying too. I now have to search with the search widget or open a new browser window to go to google.com then type in my search. Overall a small price to pay for this AWESOME KB IMO.
 

JD82

Senior Member
Feb 1, 2009
178
60
www.anddev.it
I installed the version of modaco flashed from recovery. Now I would uninstall it to use this version, how can I do?

I used the following commands:
Code:
rm /system/app/HTC_IME.apk
rm /cache/dalvik-cache/system@app@HTC_IME.apk@classes.dex
rm /system/lib/libt9.so
The application no longer there, but I can not install the High resolution version (v5) (I also tried with Astro):

Code:
$ adb install HTC_IME.apk 1313 KB/s (4587207 bytes in 3.411s)
    pkg: /data/local/tmp/HTC_IME.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
$ adb install -r HTC_IME.apk 
1290 KB/s (4587207 bytes in 3.470s)
    pkg: /data/local/tmp/HTC_IME.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

Solved!!

You must remove all references to HTC_IME from packages.xml!

Code:
$ adb pull /data/system/packages.xml .
$ gedit packages.xml
$ adb push packages.xml /data/system/
:D
 

overground

Retired Senior Moderator / Inactive Recognized Dev
These 2 methods always work for me:
Note: If you have previously installed via Astro or similar, the packages were probably installed to /data/app. Uninstall via system menu>Applications>Manage Applications and make sure "All Applications" are displayed. Then uninstall Touch_Input and if I remember correctly, Calibration.
make sure your <path_on_PC_to> contains no spaces (i.e. C:\HTC_IME.apk)
Via adb:
Code:
adb remount
adb push <path_on_PC_to>HTC_IME.apk /system/app
adb push <path_on_PC_to>Clicker.apk /system/app
exit
A reboot may be needed, but it's worked fine without for me.

Via terminal: This assumes you have placed both HTC_IME.apk and Clicker.apk in new directory: /sdcard/HTC_IME
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard/HTC_IME
install HTC_IME.apk /system/app/HTC_IME.apk
install Clicker.apk /system/app/Clicker.apk
reboot
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    I'm now taking a break from the work on this mod due to serious lack of time. I've spent a huge amount of time on this mod already and also shared all my code and methods. I hope the community has benefited from this. You are all free to do whatever you want with my code if you want to make further improvements. I hope I can find some time to continue this little project later this summer. Thanks for all the encouraging words, feature suggestions and bug reports. Couldn't have done this without you all :)


    Credits:
    • The old low res hack is based on the version posted by Cyanogen.
    • The new low res and high res hack is based on the version posted by modaco.
    • JesusFreke for smali/baksmali.
    Couldn't do this without them.

    Features:
    (Compacted this list to save space, the point is that there are many features not to make this list readable :))

    Customizable language settings, Smileys hacked into the hide key (see screen shots), Swap Smiley/12# button, Custom smileys, Custom word candidate bar that raises the keyboards so dictionary won't cover the app you type in, Position of word candidate list is saved if you long press and move it, Left align word candidate list, Prediction in fields with own suggestions (search bar etc.), Prediction in fields that sets the filter flag, Prediction in URL fields, Disable automatic capitalization, Play sounds in silent mode, Set sound level, Custom sounds, Automatic space insertion, Enable prediction with cursor in or adjacent to existing words (QWERTY only), Enable a space bar key in URL keyboard, Support for German QWERTZ hard KB layout, Show voice input button for all keyboards with a settings button, Disable key preview popup, Use Google development server for voice (supports German but isn't online 24/7), MANY HTC bugs fixed, the changelog for a few of them, Droid SE X10 landscape support, User dictionary import/export, User dictionary accepts any character, not just HTC approved ones, Custom vibration length, Character replacement (can remove diacritic chars), Pipe key in qwerty mode, Move cursor with volume keys (for Sony Ericsson Xperia X10), Easier access to language specific chars in qwerty popups, Configurable gesture (swipe) actions, Gesture actions: Delete word, delete sentence, shift, hide kb, cursor after word, voice input, switch language, switch keyboard, Use phone keypad / compact qwerty symbol kb for QWERTY, Toggle accept dict. suggestion by space / period / comma, Fast language and keyboard switching by gestures, Version tracking by aTrackDog, Custom domains for .com key

    And not least:
    My source code is now available for your own modding pleasure

    All hacks are configurable in the settings dialog.

    Changelog for latest versions
    Code:
    /*
     * 27
     * Fixed: T9 is now disabled when adding words manually (sorry, missed that bug report on v26b1)
    */
    
    /*
     * 26
     * Separate version for Froyo (2.2) due to changed voice input API:s
     * Fixed: User dictionary should now be saved correctly on Sense ROMs (if installed correctly!)
     * Fixed: Slightly better SMS detection
     * Fixed: Custom popup domains will work without enabling custom popup time (caused by typo)
     * Fixed: Smiley insertion right after period removed first smiley char
     * Fixed: Settings not remembered for some locales
     * Fixed: Tweaked space insertion around parentheses some
     * Fixed: Fixed "Predict in Browser" option on Froyo (workaround for Android issue #8563)
     * Fixed: Space deleted after period insertion and use of chars from symbol KB (HTC bug)
     * Fixed: No auto add words didn't always work
     * Fixed: Smiley button didn't work on symbol KB
     * New: Calibration is considered for all layouts
     * New: Modify button height/width on all layouts 
     * New: € £ added to f popup 
     * New: T9 toggle settings now remembered
     * New: Export/import settings to/from SD card
     * New: Pipe added to alt. symbol keyboard (page 4)
     * Gesture: Cursor before word
     */
    
    /*
     * 25
     * New: Move lang. specific popup chars closer to pressed key (help me support more langs!)
     * Option: Replace chars only for SMS
     * Option: Custom domains for .com key
     * Option: Insert period on double space
     * Option: Toggle accept dict. suggestion by 12# key
     * Option: Configurable custom sounds
     * Option: Change language with volume keys
     * Option: Adjust portrait QWERTY key width
     * Changed: Delete last sentence breaks on comma again.
     * Fixed: Space insertion disabled for URI fields (causing problems)
     * Fixed: Space insertion tweaked for French
     * Fixed: Removed Romanian since not working (blame HTC)
     * Fixed: Don't insert space if prediction is disabled in browser
     * Fixed: Predict in URL working again.
     * Fixed: Sound for HW KB working again
     * Gesture: Toggle QWERTY prediction on/off
     */

    Download
    v27
    High resolution version
    High resolution version (Froyo/2.2)

    Low resolution version for Android 1.6 and up
    Low resolution version for Android 1.5 (no voice input)

    Instructions:
    • Download and unzip (not flashable update.zip!)
    • Install the two apks (HTC_IME & Clicker) using your favorite method (via a file manager or adb install -r). Sense users shouldn't (and needn't) install Clicker.
    • There is no need to push anything to /system
    • Go to Menu, Settings, Language & Keyboard. Activate "HTC_IME mod"
    • To change keyboard, long press on lower left key on stock keyboard or any input field. Select input method in the menu.
    • See note below if you have earlier versions than v22 installed already!

    Requirements:
    • Android
    • Compatible resolution screen
    • Compatible CPU. Sorry can't say which they are but I know some Samsung phones are not supported. This is due to the included HTC native prediction library.

    Configuring my hacks
    All configuration is now done in the settings dialog. No need for config files on SD card (v22 and up).
    Some options modifies stuff that are set when the keyboard first loads. Thus you need to kill it for changes to take effect (or reboot).

    Upgrade notes
    Starting with v22 I now use my own java package name. This means that it can be installed in parallel with stock HTC_IME (no root needed on Sense).
    Settings from v21 and earlier can't be read from v22 and up. You must enter them again. The user dictionary can be exported from v21 and imported into v22. Both versions can coexist during this process. This inconvenience will only happen between v21 and newer. Sorry for this, but this change will enable me do to more advanced mods in the future.
    v23 has a hires Clicker. You should install it if not using Sense


    Source code
    Interested in how I do this? I've decided to share the sources for the mod so that the project can live on when I get tired of it. You can study it just for learning or implement your own mods. You are free to do whatever you want with if as long as you buy me a beer :)
    Download source code

    Please spend a few hours trying to set it up and figure out some stuff on your own before bombarding me with questions... :)

    Feeling thankful?
    Donations are appreciated. Donate here.

    Changelog:
    • Version 25 Highres pre Froyo, High res Froyo, Lowres >= 1.6, Lowres 1.5
    • Version 24 hires lowres: Fixed: Droid/Milestone/X10 landscape kb broken due to upscaling, Alt. symbol kb. not set correctly on start input, FC on boot when using some locales, Delete last sentence tweaked
    • Version 23 hires lowres: Fixed: User dictionary broke in v22 due to changed package name. Sorry!
    • Version 22 hires lowres: New: My own package name, Fast language & keyboard switching by gestures, Settings dialog redesigned, No more .htcime on SD, all is now GUI based, Hires Clicker, Version tracking by aTrackDog. Fixed: Scale landscape KB on Droid/Milestone/X10, Add word dialog now shows kb automatically, FC on show add word dialog in landscape, Proper hires settings icon from Incredible, P and W in phone number keyboard, Workaround for back button bug in xScope browser Option: Configurable gesture actions, Show current language on start, Kill keyboard from settings, Disable voice button also for English, Use phone keypad / compact qwerty symbol kb for QWERTY, Toggle accept dict. suggestion by space, Toggle accept dict. suggestion by separators, Volume keys for dpad up/down, Gesture: Delete last sentence, Move to end of word, Cycle language, Cycle keyboard types
    • Version 21 hires lowres: Options: Move cursor with volume keys, Move Scandinavian popup chars closer to pressed key Fixed: More swipe detection tuning, Less laggy sound and vibration feedback with swiping enabled, Space insert more robust
    • Version 20 hires lowres: Options: Swipe up for shift, Swipe while composing a word (dict. showing), Swap Smiley/12# button, Insert word entered in add word dialog into edited text. Fixed: Swiping more robust, Long press on symbol key now working again, Tweaked candidate bar height calculation (Droid 2.1), Improved HTC popup timer when lag is detected (HTC bad design), Android smiley is :-\ and not :-/ , Bug in landscape autocompletion (gmail compose etc.), Autocap issues in certain cases (blame HTC :p), Better handling of (pseudo) multi touch events (easier to press space and periods etc. more quickly)
    • Version 19 hires lowres:Lowres!, Options: Clear user dictionary, Swipe down to hide keyboard, Swipe left to delete last word, Character replacement (can remove diacritic chars), Custom smileys. Changed: Import/export of user dictionary is now threaded, Pipe key added to qwerty symbol keyboard, Fixed voice hack was enabled by default even if disabled in settings
    • Version 18: Changed: Hid HTC hidden settings again (caused too much trouble). Option: Smiley button instead of hide kb button, Custom vibration length, Toggle smiley dashes. Fixed: User dictionary editor no longer FC's on modaco custom rom, Word candidate bar now works on Droid 2.1
    • Version 17: Option: Toggle prediction on/off for single line browser forms
    • Version 16: Fixed: space insertion is now disabled for password fields with compact qwerty & phone keypad, Prediction cache was not emptied in some cases resulting in weird behavior when starting input next time (prediction continued where you left off last input)
    • Version 15: Fixed URL KB space hack caused FC on slash key in compact qwerty and phone keypad
    • Version 14: Option: Disable automatic adding to user dictionary, custom popup delay for secondary characters, swipe right for voice input, toggle space insertion after separators, access hidden HTC internal settings (control vibrator etc. TAKE CARE IN HERE!), prediction in URL fields, disable key preview popup. Fixed: cleaned up settings dialog a bit, deleting voice text by back space now works again, space insertion is now always disabled in some fields (browser URL etc. caused problems). New: My own (experimental!) hard keyboard mapping code (enables space in URL for hard KB, removes need for QWERTZ hack etc.), apk version now shows my version instead of HTC's version (smoother upgrades, more logical), Import/export user dictionary, Can now enter any character into user dictionary (HTC just allowed letters and digits)
    • Version 13: Option: left align word candidate list. Fixed: experimental Droid 2.1 landscape support, more robust period insertion on space double tap, rare FC when moving the candidate list (HTC bug), typing " I'm " with compact qwerty (HTC bug), FC when clicking on disabled T9 toggle button (HTC bug), better compatibility between space insertion and smileys, User dictionary is no longer a pain to manage due to scrolling (consequence of HTC incompetence, learn how to use ListViews and Adapters guys!)
    • Version 12: Fixed rotation issues in some apps (ie Terminal). T9/ABC setting is now remembered when switching between letter/number views (HTC's bug, not mine)
    • Version 11: Fixed saving position of word suggestion list (a typo caused the same value to be used for all orientations). Fixed auto cap in browser with physical keyboard.
    • Version 10: Many new options (see feature list). Fixes: voice input in all keyboards, voice input didn't capitalize correctly, "speak now" dialog showing to early, prediction not showing for passwords anymore, auto capitalization for T9/compact QWERTY now works in browser, smoother movement of word suggestion list, settings button showed "EN" (now scaled icon from lowres), Landscape now works on Droid (with resolution related glitches)
    • Version 9: Fixed the screwed up enter key in v8. Added experimental voice server settings. For German to work you will have to use the alternative server.
    • Version 8: Added custom word candidates bar. Fixed wacky SHIFT key. Word candidate list position now remembered. Configurable in settings dialog. Added some Extras to voice input Intent copied from stock KB (missed earlier). One step closer to Droid landscape support.
    • Version 7: Fixed compatibility with Terminal Emulator in CyanogenMod, KB going haywire in CoPilot and word candidate list shows to low (hid active input field sometimes like in stock messaging app). Lowered android:minSdkVersion from 7 to 3. This could mean stock Droid support, but don't complain when it FC's on Cupcake :D
    • Version 6: Tweaks to the sentence auto capitalization code. Should now work in most web browser forms such as the message composer on this forum. Tweaked enter key behavior a bit.
    • Version 5: Show voice input button for all languages instead of EN button in all keyboards that uses the same layouts as the English ones. To fix this in all other layouts, modding binary XML is required. I need help with that. Voice input seems to use your current locale if supported, and English as fallback.
    • Version 4: New voice input control logic that doesn't break Google Voice search. Changed voice processing URL from dev server to stock keyboard settings.
    • Version 3: Fixed FC in User Dictionary editor. Fixed HTC not obeying EditorInfo.imeOption flag flagNoEnterAction (caused two sends in stock messaging app)
    • Version 2: Fixed FC in user database
    • Version 1: Initial release featuring language settings hack with .htcime and dictionary support in web browser forms. Tested on N1. Clicker is low res for now.
    Old low res:
    • Version 4: Better support for OpenEclair (at least one reported succes with Dutch on it)
    • Version 3: Supports Samsung Galaxy/Spica (this version has never been featured on xda)
    • Version 2: Dictionary support in web browser forms
    • Version 1: Initial release featuring language settings hack with .htcime
    28
    Quick ICS Fix

    Here is a quick fixed ICS Version - Tested on SGS2 XWLP4. The change was in com.htc.android.htcime.ui.CandidateView.draw , changing FIRST_STATE_SET to EMPTY_STATE_SET. No idea what else this has affected!
    8
    Right, the grey version is done :D

    I can't remember where I originally got this APK from and can't find it again, so I am unable to give credit to the original themer.
    3
    New version of HTC IME mod available.

    [MOD] HTC_IME mod v28 http://xdaforums.com/showthread.php?t=1844512
    3
    *sigh* Sorry about this. Okay, I've now tested this on 2 devices. I think it works now.

    Tested on both MyTouch3g and G1. Use "adb install -r HTC_IME_lo22.apk" if possible.