Skip to content

Commit d52fd4f

Browse files
committed
Release v3.6.9: Offline AI via ONNX, Refactored Docs, Code Cleanup
1 parent 83c5e5f commit d52fd4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3242
-776
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ tools/*.txt
1818
*.keystore
1919
keystore.properties
2020
signing.properties
21+
22+
# Build logs
23+
*.log
24+
25+
# Offline model files
26+
tokenizer.json

README.md

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,30 @@
1010

1111
**HeliboardL** is a fork of [HeliBoard](https://github.com/Helium314/HeliBoard) - a privacy-conscious and customizable open-source keyboard based on AOSP/OpenBoard.
1212

13-
This fork adds **AI-powered features** using the Gemini API while maintaining the offline-first philosophy of the original.
13+
This fork adds **optional AI-powered features** using Gemini, Groq, and OpenAI-compatible APIs, offering a hybrid experience: a private, offline core with opt-in cloud intelligence.
1414

1515
## What's New in HeliboardL
1616

17-
- **🤖 Gemini AI Proofreading** - Fix grammar and spelling with one tap (Standard only)
18-
- **🌐 AI Translation** - Translate selected text directly (Standard only)
19-
- **🎨 Modern UI** - "Squircle" key backgrounds and refined icons (incognito, etc.)
20-
- **🕵️ Clear Incognito Mode** - Distinct "Hat & Glasses" icon for clear visibility
21-
- **🔒 Privacy Choices** - Choose **Standard** (Offline-first with opt-in AI) or **Offline** (Hard-disabled network) versions
22-
- **📥 Gesture Library Downloader** - Easier setup for glide typing
17+
- **🤖 Multi-Provider AI** - Proofread using **Gemini**, **Groq** (Llama 3, Mixtral), or **OpenAI-compatible** providers.
18+
- **🛡️ Offline AI** - Private, on-device proofreading and translation using ONNX models (Offline build only).
19+
- **🌐 AI Translation** - Translate selected text directly using your chosen AI provider.
20+
- **⌨️ Dual Toolbar / Split Suggestions** - Option to split suggestions and toolbar for easier access.
21+
- **🖱️ Touchpad Mode** - Swipe spacebar up to toggle touchpad; custom sensitivity controls.
22+
- **🎨 Modern UI** - "Squircle" key backgrounds, refined icons, and polished aesthetics.
23+
- **🔄 Google Dictionary Import** - Easily import your personal dictionary words.
24+
- **⚙️ Enhanced Customization** - Force auto-capitalization toggle, reorganized settings, and more.
25+
- **🕵️ Clear Incognito Mode** - Distinct "Hat & Glasses" icon for clear visibility.
26+
- **🔒 Privacy Choices** - Choose **Standard** (Offline-first with opt-in AI) or **Offline** (Hard-disabled network) versions.
2327

2428
## Screenshots
2529

2630
<table>
2731
<tr>
28-
<td><img src="docs/images/Screenshot1.png" height="500" alt="Screenshot 1"/></td>
29-
<td><img src="docs/images/Screenshot2.png" height="500" alt="Screenshot 2"/></td>
30-
<td><img src="docs/images/Screenshot3.png" height="500" alt="Screenshot 3"/></td>
31-
<td><img src="docs/images/Screenshot4.png" height="500" alt="Screenshot 4"/></td>
32-
<td><img src="docs/images/Screenshot5.png" height="500" alt="Screenshot 5"/></td>
33-
<td><img src="docs/images/Screenshot6.png" height="500" alt="Screenshot 6"/></td>
32+
<td><img src="docs/images/1.png" height="500" alt="Screenshot 1"/></td>
33+
<td><img src="docs/images/2.png" height="500" alt="Screenshot 2"/></td>
34+
<td><img src="docs/images/3.png" height="500" alt="Screenshot 3"/></td>
35+
<td><img src="docs/images/4.png" height="500" alt="Screenshot 4"/></td>
36+
<td><img src="docs/images/5.png" height="500" alt="Screenshot 5"/></td>
3437
</tr>
3538
</table>
3639

@@ -41,17 +44,18 @@ You can download the latest release from the [GitHub Releases](https://github.co
4144

4245
### 📦 Choose Your Version
4346

44-
We provide two distinct versions. **Note:** Both versions use the same package name (`helium314.keyboard.l`) and signature. You can only have **one** installed at a time.
45-
4647
#### 1. Standard Version (`-standard-release.apk`)
4748
* **Features:** Full suite including **AI Proofreading**, **AI Translation**, and **Gesture Library Downloader**.
48-
* **Permissions:** Request `INTERNET` permission (used *only* when you explicitly use AI features or download libraries).
49-
* **Best For:** Users who want smart features alongside privacy.
49+
* **Permissions:** Request `INTERNET` permission (used *only* when you explicitly use AI features).
50+
* **Setup:** Use the built-in downloader for Gesture Typing. Configure AI keys in Settings.
5051

5152
#### 2. Offline Version (`-offline-release.apk`)
52-
* **Features:** All UI/UX refinements (Squircle keys, new Icons) but **excludes** all AI and network features.
53-
* **Permissions:** **NO INTERNET PERMISSION** in the manifest. Guaranteed at the OS level.
54-
* **Best For:** Privacy purists who require a hard guarantee that no data can ever leave the device.
53+
* **Features:** All UI/UX enhancements and **Offline Neural Proofreading** (ONNX).
54+
* **Permissions:** **NO INTERNET PERMISSION**. Guaranteed at OS level.
55+
* **Best For:** Privacy purists.
56+
* **Manual Setup Required:**
57+
* **Gesture Typing:** [Download library manually](https://github.com/Helium314/HeliBoard/blob/master/app/src/main/jniLibs/arm64-v8a/libjni_latinimegoogle.so) and load via *Settings > Advanced*.
58+
* **Offline AI:** Download ONNX models and load via *Settings > AI Integration*. 👉 **[See Offline Setup Instructions](docs/FEATURES.md#3-offline-proofreading-privacy-focused)**
5559

5660
## Original HeliBoard Features
5761

@@ -60,7 +64,7 @@ We provide two distinct versions. **Note:** Both versions use the same package n
6064
<li>Customize keyboard themes (style, colors and background image)</li>
6165
<li>Customize keyboard layouts</li>
6266
<li>Multilingual typing</li>
63-
<li>Glide typing (<i>requires closed source library</i>)</li>
67+
<li>Glide typing (<i>requires library</i>)</li>
6468
<li>Clipboard history</li>
6569
<li>One-handed mode</li>
6670
<li>Split keyboard</li>
@@ -72,30 +76,22 @@ For original feature documentation, visit the [HeliBoard Wiki](https://github.co
7276

7377
## Setup
7478

75-
### Gemini API Key (for AI features)
76-
1. Get your free API key from [Google AI Studio](https://aistudio.google.com/apikey)
77-
2. Go to HeliboardL Settings → Advanced → Gemini API Key
78-
3. Enter your API key
79-
4. Change Gemini model to **gemini-2.5-flash** or **gemini-3n-e2b-it** for best performance.
79+
### AI Features Setup
80+
81+
HeliboardL supports multiple AI providers: **Google Gemini**, **Groq**, and **OpenAI-compatible** (OpenRouter, HuggingFace, etc.).
82+
83+
👉 **[Read the Full AI Setup & Features Guide](docs/FEATURES.md)**
8084

81-
### AI Translation Setup
82-
1. Go to Settings → Toolbar → Customize Toolbar and add the "Translate" key.
83-
2. Go to **Settings → Advanced → Translation Target Language** and select your desired output language.
85+
**Quick Start:**
86+
1. Get a free key from [Google AI Studio](https://aistudio.google.com/apikey) (Gemini) or [Groq Console](https://console.groq.com/keys) (Groq).
87+
2. Copy the API key.
88+
3. Go to **Settings → AI Integration → Set AI Provider**.
89+
4. Select your provider and paste the API Token.
90+
5. Select Model and target language
8491

8592
> [!IMPORTANT]
86-
> **Privacy Notice**: While HeliboardL itself is open-source and respects your privacy, using the **free tier** of the Google Gemini API means your input data may be used by Google to improve their models.
87-
> - Using AI features is **optional**.
88-
> - **Do not process sensitive information** (passwords, credit card numbers, private addresses) using the AI Proofreading or Translation features.
89-
> - The **Offline Version** completely removes this code and permission.
90-
91-
### Gesture/Glide Typing
92-
**Standard Version:** Use the built-in downloader in Settings → Advanced → Load Gesture Typing Library.
93-
94-
**Offline Version:**
95-
Since network access is disabled, you must manually install the library:
96-
1. Download the library file: [libjni_latinimegoogle.so](https://github.com/Helium314/HeliBoard/blob/master/app/src/main/jniLibs/arm64-v8a/libjni_latinimegoogle.so) (for arm64)
97-
2. Go to Settings → Advanced → Load Gesture Typing Library.
98-
3. Select "Load from file" and pick the downloaded `.so` file.
93+
> **Privacy**: Your input data is sent to the configured provider.
94+
> 👉 **[View Privacy Policies for Providers](docs/FEATURES.md#supported-ai-providers)**
9995
10096
## Contributing
10197

app/build.gradle.kts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ android {
2222
applicationId = "helium314.keyboardl"
2323
minSdk = 21
2424
targetSdk = 35
25-
versionCode = 3604
26-
versionName = "3.6.1"
27-
ndk {
28-
abiFilters.clear()
29-
abiFilters.addAll(listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64"))
30-
}
25+
versionCode = 3609
26+
versionName = "3.6.9"
27+
3128
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
3229
}
3330

31+
// ONNX Runtime is used instead of llama.cpp native build
32+
3433
flavorDimensions += "privacy"
3534
productFlavors {
3635
create("standard") {
3736
dimension = "privacy"
3837
}
3938
create("offline") {
4039
dimension = "privacy"
40+
applicationIdSuffix = ".offline"
4141
}
4242
}
4343

@@ -105,12 +105,12 @@ android {
105105
compose = true
106106
}
107107

108-
externalNativeBuild {
109-
ndkBuild {
110-
path = File("src/main/jni/Android.mk")
111-
}
112-
}
113-
ndkVersion = "28.0.13004108"
108+
// externalNativeBuild {
109+
// ndkBuild {
110+
// path = File("src/main/jni/Android.mk")
111+
// }
112+
// }
113+
//// ndkVersion = "28.0.13004108"
114114

115115
packaging {
116116
jniLibs {
@@ -172,6 +172,10 @@ dependencies {
172172
"standardImplementation"("com.google.ai.client.generativeai:generativeai:0.9.0")
173173
"standardImplementation"("androidx.security:security-crypto:1.1.0-alpha06") // for encrypted API key storage
174174

175+
// local llm proofreading (offline)
176+
// ONNX Runtime for T5 encoder-decoder grammar models
177+
"offlineImplementation"("com.microsoft.onnxruntime:onnxruntime-android:1.17.3")
178+
175179
// test
176180
testImplementation(kotlin("test"))
177181
testImplementation("junit:junit:4.13.2")

app/proguard-rules.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@
2424
-keep class helium314.keyboard.latin.utils.GeminiProofreadService { *; }
2525
-keep class helium314.keyboard.latin.utils.ProofreadHelper { *; }
2626
-keep class helium314.keyboard.latin.utils.ProofreadHelper$* { *; }
27+
28+
# Keep java-llama.cpp classes
29+
-keep class de.kherud.llama.** { *; }

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ SPDX-License-Identifier: Apache-2.0 AND GPL-3.0-only
88
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
99
xmlns:tools="http://schemas.android.com/tools">
1010

11+
12+
1113
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
1214
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
1315
<uses-permission android:name="android.permission.VIBRATE" />

app/src/main/java/helium314/keyboard/compat/AppWorkarounds.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ object AppWorkarounds {
2323
// for all others we also add NO_SUGGESTIONS to avoid JS messing with the composing text
2424
inputType or InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
2525
}
26+
2627
else -> inputType
2728
}
2829
}

0 commit comments

Comments
 (0)