Page 1 of 1

Importing user dictionary via restoring backup

Posted: Sun Sep 26, 2010 2:00 pm
by lapster
Hai!
I made a back up of my keyboard settings and imported my custom dictionary (~700 words) from a .txt file into userdic.db file using SQLite. Everything went smooth until it was time to restore the modified backup.zip file. Keyboard restore function didn't seem to do anything. This is where I noticed a problem. When backing up data with the software it creates backup.zip with folder hierarchy /data/data/net.cdeguet.smartkeyboardpro/... and so on. But when examining the zip archive with astro file manager there was an unnamed folder in root of the zip file under which were the first data folder. When repacking my modified back up with imported user dictionary into .zip I was unable to reproduce the same unnamed folder thus the back up restore function of the software failed. Does anyone have any insight or tips on this matter? Thanks in advance.

Re: Importing user dictionary via restoring backup

Posted: Sun Sep 26, 2010 5:35 pm
by cyril
I'm not sure this can be the problem, but this unnamed folder you see in Astro may correspond to the first "/" of the file path.
I don't know which tool you use to repack the file, but you should check if there is an option to store absolute file paths and not relative ones

Re: Importing user dictionary via restoring backup

Posted: Sun Sep 26, 2010 6:49 pm
by lapster
No dice, sir. The nameless folder under which all the rest stuff is (as in /data/data/...) also results into the fact that copying anything straight into the archive without unpacking the .zip results in error 'NullPointerException'.

The result of modifying backup.zip on (2 different) archive managers on linux was that they both created an extra path under which they placed imported userdic.db.

backup.zip -> *nameless* -> /data/data/net.cdeguet.smartkeyboardpro/ -> databases/autotext.db and shared_prefs/net.cdeguet.smartkeyboardpro_preferences.xml
|-> /data/data/net.cdeguet.smartkeyboardpro/databases/userdic.db

The mystic folder can be easily verified just by creating a backup file from the software and browsing into backup.zip using some file browser (astro in my case).

Re: Importing user dictionary via restoring backup

Posted: Sun Sep 26, 2010 7:02 pm
by cyril
Just to be sure, if you tried to extract it on Linux, do you have write access in / to create the "data" folder?
If you cannot make it with this method, maybe it's easier to copy userdic.db manually to the right location on the phone (ie in /data/data/net.cdeguet.smartkeyboardpro/databases/) with "adb" if you have the Android SDK

Re: Importing user dictionary via restoring backup

Posted: Mon Sep 27, 2010 6:02 pm
by lapster
Got it working with adb and after that tried again by creating the archive from the root of the operating system. That seems to be working now too, although astro doesn't see that 'nameless' folder which it does in the original backup.zip. Go figure...

And while I'm at it I'd like to suggest that changing keyboard language/layout would also change speech recognition language if both languages support speech to text. (Actually I'm not sure if keyboards have the power of controlling that but if they do that would be great).

Keep up the good work, sir.

Re: Importing user dictionary via restoring backup

Posted: Wed Feb 13, 2013 7:57 am
by henrythibault41
lapster wrote:I'd like to suggest that changing keyboard language/layout would also change speech recognition language if both languages support speech to text.
This worked just fine for both English and German on my old Motorola Droid X on Verizon, but after downloading both English and German dictionaries, and otherwise doing the same setup as before, I cannot get German speech recognition when changing from EN to DE on my new Samsung Galaxy Note 2 on US Cellular. I have to get into "Settings" to change the speech recognition language, which is a drag compared to a one-keystroke transition. However, predictive typing switches from EN to DE and back just fine. I lived in Germany for nine years and was married to a German for 19 years, so I have lots of German-speaking family and friends, and easily switching to and from German speech recognition is very important to me.

Re: Importing user dictionary via restoring backup

Posted: Wed Feb 13, 2013 9:09 pm
by henrythibault41
henrythibault41 wrote:
lapster wrote:I'd like to suggest that changing keyboard language/layout would also change speech recognition language if both languages support speech to text.
This worked just fine for both English and German on my old Motorola Droid X on Verizon, but after downloading both English and German dictionaries, and otherwise doing the same setup as before, I cannot get German speech recognition when changing from EN to DE on my new Samsung Galaxy Note 2 on US Cellular. I have to get into "Settings" to change the speech recognition language, which is a drag compared to a one-keystroke transition. However, predictive typing switches from EN to DE and back just fine. I lived in Germany for nine years and was married to a German for 19 years, so I have lots of German-speaking family and friends, and easily switching to and from German speech recognition is very important to me.
Samsung responded quickly but inaccurately, snottily, and arrogantly to my query about this problem, recommending changing settings, which I had said that I was already doing and was not happy with, and saying that if I don't use Samsung apps, they aren't responsible for doing stuff that screws up the apps that I do use, even if these are good apps obtained from the right sources and used successfully for years by zillions of smartphoneers. I did find a solution, though, which was to switch from "Smart Keyboard" to "Swiftkey," which is almost as easy to switch between languages for speech recognition as "Smart Keyboard," and does a much better job of predictive typing, displaying choices in all languages installed. Installing a language also goes much faster. Sorry, Smart Keyboard, but Swiftkey is on balance a better product.