trime
Rime IME for Android
About
Trime is an Android input method frontend built on the RIME input method engine via JNI and written in Kotlin. It originated from the open-source Android Traditional Chinese IME project. It supports Android 8.0 and later, and is designed to help preserve the native languages of Chinese dialects while providing a universal platform for shape-based and phonetic-based input methods.
Download
History
TRIME is the abbreviation of Tongwen RIME or ThaeRv Input Method.
From the beginning, TRIME was written for TaeRv Pinyin, and named TaeRv Input Method (泰如输入法).
Then, we created an input method platform with some code tables, such as Wu dialect (吴语). We renamed it to Chinese Character Dialect Input Method (汉字方言输入法).
Later, it supported Wubi, Liangbi, and other shape-based input methods, and we branded it Tongwen Input Method Platform 2.0 (同文输入法平台 2.0), which implies that phonetic-based and shape-based input methods share one platform, while dialects and Mandarin share a common set of characters.
Thanks to the librime project and JNI, we are now at version 3.x of TRIME, also known as Tongwen Input Method (同文输入法).
Contributions are welcome! Please see CONTRIBUTING.md.
Getting Started for developer
Prepare
Requirements:
Android SDK and Android NDK
- If you are new to Android development, please install Android Studio. It will install and configure the required SDK, NDK, and CMake versions.
JDK (OpenJDK) 17
Python 3 (required by OpenCC to generate dictionary text files)
Prerequisites for Windows
Symbolic links will be created according to current build configurations, developers need:
Enable Developer Mode so that symlinks can be created without administrator privilege.
Enable symlink support for
git:git config --global core.symlinks true
If you cannot or wouldn't like to enable anything, it doesn't matter. Copying will be used instead when error on creating symbolic links.
Build
1. Clone this project and fetch all submodules:
git clone https://github.com/osfans/trime.git
cd trime
git submodule update --init --recursive
# Alternatively, use a partial clone to save time:
# git submodule update --init --recursive --filter=blob:none
2. Debug version without signature:
# On Linux or macOS
make debug
# On Windows
.\gradlew assembleDebug
The first native build downloads Boost automatically, so an internet connection is required.
3. Release version with signature:
Create a keystore.properties file in the repository root with your signing information:
storePassword=myStorePassword
keyPassword=mykeyPassword
keyAlias=myKeyAlias
storeFile=myStoreFileLocation
Then run:
# On Linux or macOS
make release
# On Windows
.\gradlew assembleRelease
Checks
Run unit tests and Android lint:
make check
Apply code style formatting:
make style-apply
Troubleshooting
If a native build fails after updating submodules or toolchains, remove the build artifacts and try again:
# On Linux or macOS
make clean
# On Windows
.\gradlew clean
Other issues:
- Make sure all submodules are initialized and up to date. If one or more submodules are modified, make sure they are compatible with the current revision.
- If the problem persists, try a fresh clone.
- Check whether an existing issue or pull request covers the problem and try the suggested solution.
- If none of the above helps, open an issue with your build logs.
Acknowledgments
- Developer: osfans
- Contributors: boboIqiqi, Bambooin, senchi96, heiher, abay, iovxw, huyz-git, tumuyan, WhiredPlanck, nopdan. See AUTHORS for the full list.
- Wiki Editors: xiaoqun2016, boboIqiqi...
- Translators: 天真可爱的满满 (Chinese Traditional), 点解 (English) ...
- Keyboard Designers: 天真可爱的满满、皛筱晓小笨鱼、吴琛 11、熊猫阿 Bo、默默ㄇㄛ ˋ...
- Donations: See QR Code in Releases
- Community: Everyone who has provided feedback in Issues, QQ Group (811142286), QQ Group (224230445), Tieba, and Telegram.
- Projects: RIME, OpenCC, Android Traditional Chinese IME and so on.
Third-Party Libraries
- Boost C++ Libraries (Boost Software License)
- darts-clone (New BSD License)
- LevelDB (New BSD License)
- libiconv (LGPL License)
- librime-lua (BSD 3-Clause License)
- librime-octagram (GPL-3.0 License)
- librime-predict (BSD 3-Clause License)
- marisa-trie (BSD License)
- glog (New BSD License)
- OpenCC (Apache License 2.0)
- RIME (BSD License)
- snappy (BSD License)
- utfcpp (Boost Software License)
- yaml-cpp (MIT License)
- Android Traditional Chinese IME (Apache License 2.0)

