Skip to content

ezn24/fcitx5-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,271 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fcitx5-android-ez

FX 分支基础进行开发,会融入上游的更新 全程由Codex编写代码,修改增加了一些特性

包名为了方便改成了org.fcitx.fcitx5.android.ez

可在 releases 下面下载体验 目前暂时只会构建出 Preview release

增加内容:

  • 英语输入法:
    • 自定词典
    • 自定字词功能
    • 短语联想(本地自带来源于 TatoebaGoogle Books Ngram):
      • 自定联想词库:用户可以自行寻找实用的联想词库
      • 权重机制:权重越高,就会出现在越前面
      • 预设联想数量:因为自带联想词库庞大,所以默认只会显示权重前10高的短语,用户也可以在设置里自定
      • 自定联想:
        • 新增需要输入想要添加的短语比如 your mum
          稍等片刻底列出目前相关联想权重前10高的短语 用户可以根据需求调整短语的权重
      • 联想权重学习:会根据用户的使用频率调整权重
  • 拉取最新 Unicode emoji (部分多人emoji没有放入)
  • 改进拼音输入 emoji 的触发 & 添加自定拼音emoji字典的编辑
  • 新增为三星用户设计的音效开关,开启可启用三星键盘的音效

构建

主要输出路径: app/build/outputs/apk/fx/<buildType>

数据目录: /Android/data/org.fcitx.fcitx5.android.ez/...

#构建带 .ez 后缀的变体
./gradlew :app:assembleDebug

同时为了兼容常见脚本,构建后会自动同步一份 APK 到 app/build/outputs/apk/<buildType>

想要生成与主仓命名一致的 mainline 变体时,可加上 -PincludeMainlineFlavor=true 并使用对应的 variant,例如:

./gradlew -PincludeMainlineFlavor=true :app:assembleMainlineDebug
./gradlew -PincludeMainlineFlavor=true :app:assembleMainlineRelease

mainline 变体会输出无 .ez 后缀的包名、应用名、资源以及 APK/日志命名(输出路径为 app/build/outputs/apk/mainline/<buildType>,数据目录 /Android/data/org.fcitx.fcitx5.android/... 亦跟主仓一致),运行时与 upstream 原仓保持一致;其余构建逻辑与 ez 变体完全相同。


fcitx5-android

Fcitx5 input method framework and engines ported to Android.

Download

Git it on GitHub Get it on F-Droid Get it on Google Play

You can also download the latest CI build on our Jeninks server: build status

Note

APKs downloaded from GitHub Release/F-Droid/Jenkins have the same signature, which means they're compatible when upgrading, but Google Play's do not.

(click here for detailed signature info)
  • Package Name: org.fcitx.fcitx5.android
  • Certificate SHA-256 fingerprint:
    • GitHub Release/Jenkins/F-Droid
    • E4:DB:1E:9E:DF:F1:36:29:D0:7D:E4:BB:F8:16:5F:E9:BD:85:57:AB:55:09:26:72:DA:8E:40:DB:E4:84:EC:D7
    • Google Play
    • 06:53:6F:F6:E8:76:C0:14:E1:4B:44:6F:61:FA:2B:80:9E:06:67:39:A1:D1:17:0D:0A:7A:89:88:4C:48:00:33

In case you want Fcitx5 on other platforms: macOS, iOS, HarmonyOS, ChromeOS, Windows; or try Fcitx5 in the browser

Project status

Supported Languages

Implemented Features

  • Virtual Keyboard (layout not customizable yet)
  • Expandable candidate view
  • Clipboard management (plain text only)
  • Theming (custom color scheme, background image and dynamic color aka monet color after Android 12)
  • Popup preview on key press
  • Long press popup keyboard for convenient symbol input
  • Symbol and Emoji picker
  • Plugin System for loading addons from other installed apk
  • Floating candidates panel when using physical keyboard

Planned Features

  • Customizable keyboard layout
  • More input methods (via plugin)

Screenshots

拼音, Material Light theme, key border enabled 自然码双拼, Pixel Dark theme, key border disabled
Emoji picker, Pixel Light theme, key border enabled Symbol picker, Material Dark theme, key border disabled

Get involved

Trello kanban: https://trello.com/b/gftk6ZdV/kanban

Matrix Room: https://matrix.to/#/#fcitx5-android:mozilla.org

Discuss on Telegram: @fcitx5_android_group (@fcitx5_android originally)

Build

Dependencies

  • Android SDK Platform & Build-Tools 35.
  • Android NDK (Side by side) 25 & CMake 3.22.1, they can be installed using SDK Manager in Android Studio or sdkmanager command line.
  • KDE/extra-cmake-modules
  • GNU Gettext >= 0.20 (for msgfmt binary; or install appstream if you really have to use gettext <= 0.19.)

How to set up development environment

Prerequisites for Windows
  • Enable Developer Mode so that symlinks can be created without administrator privilege.

  • Enable symlink support for git:

    git config --global core.symlinks true

First, clone this repository and fetch all submodules:

git clone git@github.com:fcitx5-android/fcitx5-android.git
git submodule update --init --recursive

Install extra-cmake-modules and gettext with your system package manager:

# For Arch Linux (Arch has gettext in it's base meta package)
sudo pacman -S extra-cmake-modules

# For Debian/Ubuntu
sudo apt install extra-cmake-modules gettext

# For macOS
brew install extra-cmake-modules gettext

# For Windows, install MSYS2 and execute in its shell (UCRT64)
pacman -S mingw-w64-ucrt-x86_64-extra-cmake-modules mingw-w64-ucrt-x86_64-gettext
# then add C:\msys64\ucrt64\bin to PATH

Install Android SDK Platform, Android SDK Build-Tools, Android NDK and cmake via SDK Manager in Android Studio:

Detailed steps (screenshots)

Note: These screenshots are for references and the versions in them may be out of date. The current recommended versions are recorded in Versions.kt file.

Open SDK Manager

Install SDK Platform

Install SDK Build-Tools

Install NDK

Install CMake

Trouble-shooting

  • Android Studio indexing takes forever to complete and cosumes a lot of memory.

    Switch to "Project" view in the "Project" tool window (namely the file tree side bar), right click lib/fcitx5/src/main/cpp/prebuilt directory, then select "Mark Directory as > Excluded". You may also need to restart the IDE to interrupt ongoing indexing process.

  • Gradle error: "No variants found for ':app'. Check build files to ensure at least one variant exists." or "[CXX1210] /CMakeLists.txt debug|arm64-v8a : No compatible library found"

    Examine if there are environment variables set such as _JAVA_OPTIONS or JAVA_TOOL_OPTIONS. You might want to clear them (maybe in the startup script studio.sh of Android Studio), as some gradle plugin treats anything in stderr as errors and aborts.

Nix

Appropriate Android SDK with NDK is available in the development shell. The gradlew should work out-of-the-box, so you can install the app to your phone with ./gradlew installDebug after applying the patch mentioned above. For development, you may want to install the unstable version of Android Studio, and point the project SDK path to $ANDROID_SDK_ROOT defined in the shell. Notice that Android Studio may generate wrong local.properties which sets the SDK location to ~/Android/SDK (installed by SDK Manager). In such case, you need specify sdk.dir as the project SDK in that file manually, in case Android Studio sticks to the wrong global SDK.

About

Fcitx5 input method framework and engines ported to Android

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 82.9%
  • Java 11.6%
  • C++ 4.0%
  • CMake 0.7%
  • Lua 0.4%
  • Python 0.3%
  • Other 0.1%