Hi, Very useful information, thanks! Got everything to work nicely, one quick question:
I use Eclipse, not GNU make. I noticed Android.mk for LatinIME specifies a "-0 .dict" aapt flag (I'm guessing "store uncompressed"). Is there some way to do the same while using the Eclipse builder? Right now I'm manually fudging the generated APK (zip -d ime.apk res/ raw/main.dict; zip -0 ime.apk res/raw/main.dict) before signing, but I'd like to do this as part of the build process (makes testing a bit tedious). Thanks! Spiros On Jul 8, 12:23 pm, "nEx.Software" <[email protected]> wrote: > So, in sending in a FileDescriptor, I assume I would need to modify > openNative to take a FileDescriptor... > > Presumably, I would get a FileDescriptor like this: > > AssetManager am = context.getResources().getAssets(); > AssetFileDescriptor afd = am.openNonAssetFd("mydictionaryfile"); > FileDescriptor fd = afd.getFileDescriptor(); > > Is there anything else I would need to do? I will be storing my > dictionary in raw, as it the case with the LatinIME. > > On Jul 8, 5:49 am, "nEx.Software" <[email protected]> wrote: > > > > > Great... thanks for the info Dianne. I appreciate i. > > > On Jul 8, 12:25 am, Dianne Hackborn <[email protected]> wrote: > > > > Oh sorry, yeah those are not part of the NDK. However you should be able > > > to > > > use the Java API to open a FileDescriptor for an asset, and hand that to > > > native code for it to use the fd. The only limitation is that the asset > > > will need to be stored uncompressed. (Alternatively, an .apk is just a > > > zip > > > file, so worst case you could compile the zip code into your app and use > > > that to extract the file you want.) > > > > On Tue, Jul 7, 2009 at 11:54 PM, nEx.Software > > > <[email protected]>wrote: > > > > > So, I've been looking over the LatinIME in the git repository, and I > > > > am getting the feeling that this (the native dictionary piece) can't > > > > be compiled on the NDK - at least not officially? There seem to be > > > > some unsupported libraries and such being used. Specifically, Asset.h > > > > and AssetManager.h which look to be a part of the base/include/utils > > > > portion of the source tree. I assume these are not a part of the NDK > > > > scope at this point? > > > > > On Jul 7, 4:13 pm, "nEx.Software" <[email protected]> wrote: > > > > > Awesome, thanks for the info. I had a feeling that was the case. > > > > > Thanks for confirming that for me. > > > > > > On Jul 7, 3:04 pm, Dianne Hackborn <[email protected]> wrote: > > > > > > > The prediction dictionary is built into the IME, it is not a part of > > > > the > > > > > > platform like the user dictionary, so you will need to implement > > > > > > your > > > > own > > > > > > for your IME. The LatinIME code is open source, so to start you can > > > > just > > > > > > copy it (especially now that we have the NDK available). > > > > > > > On Tue, Jul 7, 2009 at 2:56 PM, nEx.Software < > > > > [email protected]>wrote: > > > > > > > > I am attempting to do an IME and am wondering the best way to use > > > > > > > the > > > > > > > main dictionary for the suggestions to work? Using the User > > > > Dictionary > > > > > > > is pretty straight forward, but I am not sure how to use the main > > > > > > > dictionary. The System IME appears to use BinaryDictionary and a > > > > > > > native method to do this? Can I piggy back on this or must I > > > > > > > create > > > > my > > > > > > > own implementation? Thanks in advance. > > > > > > > -- > > > > > > Dianne Hackborn > > > > > > Android framework engineer > > > > > > [email protected] > > > > > > > Note: please don't send private questions to me, as I don't have > > > > > > time > > > > to > > > > > > provide private support, and so won't reply to such e-mails. All > > > > > > such > > > > > > questions should be posted on public forums, where I and others can > > > > > > see > > > > and > > > > > > answer them. > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > > and > > > answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

