Skip to content

Commit

Permalink
Merge branch 'release/1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sds100 committed Sep 15, 2020
2 parents 1b2c69f + 3747f54 commit 0cb4626
Show file tree
Hide file tree
Showing 378 changed files with 1,615 additions and 1,555 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Android CI

on:
push:
branches:
- 'develop'
- 'release/*'

jobs:
apk:
name: Generate APK
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1

- name: Update Run Number in properties
uses: christian-draeger/[email protected]
with:
path: gradle.properties
property: RUN_NUMBER
value: ${{ github.run_number }}

- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Make .android folder
run: mkdir /home/runner/.android

- name: Create debug keystore
run: |
echo "${{ secrets.CI_KEYSTORE }}" > debug.keystore.asc
gpg -d --passphrase "${{ secrets.CI_KEYSTORE_DECRYPT }}" --batch debug.keystore.asc > /home/runner/.android/debug.keystore
- name: Build debug APK
run: bash ./gradlew assembleCi --stacktrace

- name: set apk name env
run: echo ::set-env name=APK_NAME::$(basename app/build/outputs/apk/ci/*.apk .apk)

- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: ${{ env.APK_NAME }}
path: app/build/outputs/apk/ci/${{ env.APK_NAME }}.apk

- name: Upload to Discord
uses: sinshutu/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: app/build/outputs/apk/ci/${{ env.APK_NAME }}.apk
57 changes: 8 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,11 @@
# OpenBoard
<a href='https://f-droid.org/packages/org.dslul.openboard.inputmethod.latin'><img src='https://fdroid.gitlab.io/artwork/badge/get-it-on.png' alt='Get it on F-Droid' height='80'></a>
<a href='https://play.google.com/store/apps/details?id=org.dslul.openboard.inputmethod.latin&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height='80px'/></a>
100% FOSS keyboard, forked from [OpenBoard](https://github.com/dslul/openboard), which is forked from the AOSP keyboard.

![](images/feature.png)
A huge thank you to [@dslul](https://github.com/dslul), who made this project possible! 😁 Otherwise,
I would have had to spend a long time figuring out how to make the AOSP keyboard compile out of tree and make
dictionaries work.

100% FOSS keyboard, based on AOSP.
## Contributing
Contribute to the [OpenBoard](https://github.com/dslul/openboard) project if it isn't a fix for the Key Mapper integration.

## Permissions
* **Read Contacts**: Used to add your contact list to suggestions. Disabled by default.

## Contribute

### How to create a dictionary
You can use [this tool](https://github.com/remi0s/aosp-dictionary-tools) to create a dictionary. You need a wordlist, as described [here](https://github.com/dslul/openboard/blob/master/dictionaries/sample.combined). The output .dict file must be put in [res/raw](https://github.com/dslul/openboard/tree/master/app/src/main/res/raw).

### APK Development

#### Linux

Install java:
```sh
sudo pacman -S jdk8-openjdk jre8-openjdk jre8-openjdk-headless
```

Install Android SDK:
```sh
sudo pacman -S snapd
sudo snap install androidsdk
```

Configure your SDK location in your `~/.bash_profile` or `~/.bashrc`:
```bash
export ANDROID_SDK_ROOT=~/snap/androidsdk/current/AndroidSDK/
```

Install the platform tools for your target android version:
```sh
androidsdk "platform-tools" "platforms;android-28"
```

Compile the project. This will install all dependencies, make sure to accept
licenses when prompted.

```sh
./gradlew assembleDebug
```

Connect your phone and install the debug APK
```sh
adb install ./app/build/outputs/apk/debug/app-debug.apk
```
I will make any bug fixes or add features that are useful to people who don't use Key Mapper pull requests in
OpenBoard.
24 changes: 20 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29

defaultConfig {
applicationId "org.dslul.openboard.inputmethod.latin"
applicationId "io.github.sds100.keymapper.inputmethod.latin"
minSdkVersion 19
targetSdkVersion 29
versionCode 10
versionName "1.3"
versionCode 11
versionName "1.3.1"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
versionNameSuffix "-debug"
}
ci {
debuggable = true

versionNameSuffix "-ci.$RUN_NUMBER"
signingConfig signingConfigs.debug
}
}

aaptOptions {
Expand All @@ -35,12 +44,19 @@ android {
}
}

android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "keymapper-gui-keyboard-${variant.versionName}.apk"
}
}

dependencies {
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "androidx.core:core-ktx:1.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

repositories {
mavenCentral()
}
14 changes: 7 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
coreApp="true"
package="org.dslul.openboard.inputmethod.latin">
package="io.github.sds100.keymapper.inputmethod.latin">

<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
Expand All @@ -28,17 +28,17 @@
To use this, add the following line into calling application's AndroidManifest.xml
<pre>
{@code
<uses-permission android:name="org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT"/>
<uses-permission android:name="io.github.sds100.keymapper.inputmethod.latin.HIDE_SOFT_INPUT"/>
}
</pre>
then call {@link android.content.Context#sendBroadcast(Intent)} as follows:
<pre>
{@code
sendBroadcast(new Intent("org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT")
.setPackage("org.dslul.openboard.inputmethod.latin"));
sendBroadcast(new Intent("io.github.sds100.keymapper.inputmethod.latin.HIDE_SOFT_INPUT")
.setPackage("io.github.sds100.keymapper.inputmethod.latin"));
}
</pre> -->
<permission android:name="org.dslul.openboard.inputmethod.latin.HIDE_SOFT_INPUT"
<permission android:name="io.github.sds100.keymapper.inputmethod.latin.HIDE_SOFT_INPUT"
android:protectionLevel="signature" />

<application android:label="@string/english_ime_name"
Expand Down Expand Up @@ -131,12 +131,12 @@

<receiver android:name="DictionaryPackInstallBroadcastReceiver" android:exported="false">
<intent-filter>
<action android:name="org.dslul.openboard.inputmethod.dictionarypack.aosp.UNKNOWN_CLIENT" />
<action android:name="io.github.sds100.keymapper.inputmethod.dictionarypack.aosp.UNKNOWN_CLIENT" />
</intent-filter>
</receiver>

<!-- Content providers -->
<provider android:name="org.dslul.openboard.inputmethod.dictionarypack.DictionaryProvider"
<provider android:name="io.github.sds100.keymapper.inputmethod.dictionarypack.DictionaryProvider"
android:grantUriPermissions="true"
android:exported="false"
android:authorities="@string/authority"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.content.Context
import android.os.Handler
import android.os.Message
import org.dslul.openboard.inputmethod.keyboard.Key
import org.dslul.openboard.inputmethod.latin.R
import io.github.sds100.keymapper.inputmethod.keyboard.Key
import io.github.sds100.keymapper.inputmethod.latin.R

// Handling long press timer to show a more keys keyboard.
internal class AccessibilityLongPressTimer(private val mCallback: LongPressTimerCallback,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.content.Context
import android.media.AudioManager
Expand All @@ -13,9 +13,9 @@ import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityManager
import android.view.inputmethod.EditorInfo
import androidx.core.view.accessibility.AccessibilityEventCompat
import org.dslul.openboard.inputmethod.latin.R
import org.dslul.openboard.inputmethod.latin.SuggestedWords
import org.dslul.openboard.inputmethod.latin.utils.InputTypeUtils
import io.github.sds100.keymapper.inputmethod.latin.R
import io.github.sds100.keymapper.inputmethod.latin.SuggestedWords
import io.github.sds100.keymapper.inputmethod.latin.utils.InputTypeUtils

class AccessibilityUtils private constructor() {
private var mContext: Context? = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.content.Context
import android.text.TextUtils
import android.util.Log
import android.util.SparseIntArray
import android.view.inputmethod.EditorInfo
import org.dslul.openboard.inputmethod.keyboard.Key
import org.dslul.openboard.inputmethod.keyboard.Keyboard
import org.dslul.openboard.inputmethod.keyboard.KeyboardId
import org.dslul.openboard.inputmethod.latin.R
import org.dslul.openboard.inputmethod.latin.common.Constants
import org.dslul.openboard.inputmethod.latin.common.StringUtils
import io.github.sds100.keymapper.inputmethod.keyboard.Key
import io.github.sds100.keymapper.inputmethod.keyboard.Keyboard
import io.github.sds100.keymapper.inputmethod.keyboard.KeyboardId
import io.github.sds100.keymapper.inputmethod.latin.R
import io.github.sds100.keymapper.inputmethod.latin.common.Constants
import io.github.sds100.keymapper.inputmethod.latin.common.StringUtils
import java.util.*

internal class KeyCodeDescriptionMapper private constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.os.SystemClock
import android.util.Log
Expand All @@ -8,10 +8,10 @@ import android.view.accessibility.AccessibilityEvent
import androidx.core.view.AccessibilityDelegateCompat
import androidx.core.view.ViewCompat
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
import org.dslul.openboard.inputmethod.keyboard.Key
import org.dslul.openboard.inputmethod.keyboard.KeyDetector
import org.dslul.openboard.inputmethod.keyboard.Keyboard
import org.dslul.openboard.inputmethod.keyboard.KeyboardView
import io.github.sds100.keymapper.inputmethod.keyboard.Key
import io.github.sds100.keymapper.inputmethod.keyboard.KeyDetector
import io.github.sds100.keymapper.inputmethod.keyboard.Keyboard
import io.github.sds100.keymapper.inputmethod.keyboard.KeyboardView

/**
* This class represents a delegate that can be registered in a class that extends
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.graphics.Rect
import android.os.Bundle
Expand All @@ -9,11 +9,11 @@ import androidx.core.view.ViewCompat
import androidx.core.view.accessibility.AccessibilityEventCompat
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
import androidx.core.view.accessibility.AccessibilityNodeProviderCompat
import org.dslul.openboard.inputmethod.keyboard.Key
import org.dslul.openboard.inputmethod.keyboard.Keyboard
import org.dslul.openboard.inputmethod.keyboard.KeyboardView
import org.dslul.openboard.inputmethod.latin.common.CoordinateUtils
import org.dslul.openboard.inputmethod.latin.settings.Settings
import io.github.sds100.keymapper.inputmethod.keyboard.Key
import io.github.sds100.keymapper.inputmethod.keyboard.Keyboard
import io.github.sds100.keymapper.inputmethod.keyboard.KeyboardView
import io.github.sds100.keymapper.inputmethod.latin.common.CoordinateUtils
import io.github.sds100.keymapper.inputmethod.latin.settings.Settings

/**
* Exposes a virtual view sub-tree for [KeyboardView] and generates
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.graphics.Rect
import android.os.SystemClock
import android.util.Log
import android.util.SparseIntArray
import android.view.MotionEvent
import org.dslul.openboard.inputmethod.accessibility.AccessibilityLongPressTimer.LongPressTimerCallback
import org.dslul.openboard.inputmethod.keyboard.*
import org.dslul.openboard.inputmethod.latin.R
import org.dslul.openboard.inputmethod.latin.utils.SubtypeLocaleUtils
import io.github.sds100.keymapper.inputmethod.accessibility.AccessibilityLongPressTimer.LongPressTimerCallback
import io.github.sds100.keymapper.inputmethod.keyboard.*
import io.github.sds100.keymapper.inputmethod.latin.R
import io.github.sds100.keymapper.inputmethod.latin.utils.SubtypeLocaleUtils

/**
* This class represents a delegate that can be registered in [MainKeyboardView] to enhance
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.dslul.openboard.inputmethod.accessibility
package io.github.sds100.keymapper.inputmethod.accessibility

import android.graphics.Rect
import android.util.Log
import android.view.MotionEvent
import org.dslul.openboard.inputmethod.keyboard.KeyDetector
import org.dslul.openboard.inputmethod.keyboard.MoreKeysKeyboardView
import org.dslul.openboard.inputmethod.keyboard.PointerTracker
import io.github.sds100.keymapper.inputmethod.keyboard.KeyDetector
import io.github.sds100.keymapper.inputmethod.keyboard.MoreKeysKeyboardView
import io.github.sds100.keymapper.inputmethod.keyboard.PointerTracker

/**
* This class represents a delegate that can be registered in [MoreKeysKeyboardView] to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.annotations
package io.github.sds100.keymapper.inputmethod.annotations

/**
* Denotes that the class, method or field should not be eliminated by ProGuard,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.annotations
package io.github.sds100.keymapper.inputmethod.annotations

/**
* Denotes that the class, method or field should not be eliminated by ProGuard,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.compat
package io.github.sds100.keymapper.inputmethod.compat

import android.content.pm.PackageInfo

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.compat
package io.github.sds100.keymapper.inputmethod.compat

import android.text.TextUtils
import android.util.Log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.compat
package io.github.sds100.keymapper.inputmethod.compat

import android.annotation.TargetApi
import android.graphics.Matrix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dslul.openboard.inputmethod.compat
package io.github.sds100.keymapper.inputmethod.compat

import android.view.inputmethod.EditorInfo
import java.util.*
Expand Down
Loading

0 comments on commit 0cb4626

Please sign in to comment.