Skip to content

Commit

Permalink
Merge CI
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtCode authored Feb 14, 2024
2 parents e7abb4c + 86c8a55 commit ed64dc1
Show file tree
Hide file tree
Showing 14 changed files with 102 additions and 27 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Sign Release

permissions:
contents: write

on:
workflow_dispatch:
release:
types: [created]

jobs:
build-and-sign:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}

- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Create Keystore File
shell: bash
env:
KEYSTORE_DATA: ${{ secrets.KEYSTORE_DATA }}
run: |
echo "$KEYSTORE_DATA" | base64 -d > app/keystore.jks
- name: Build and Sign Release
env:
KEYSTORE_FILE: keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew assembleRelease

- name: Store build Artifact
uses: action/upload-artifact@v4
with:
name: release-${{ github.ref_name }}
path: app/build/outputs/apk/release/app-release.apk

- name: Upload to Release
run: |
gh release upload ${{ github.ref_name }} app/build/outputs/apk/release/app-release.apk%#%SmartMouse-${{ github.ref_name }}.apk
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
.externalNativeBuild
.cxx
local.properties
/app/release
/secret
app/keystore.jks
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,24 @@ This app is defined by the following three core features:
- **Powerful Interface**: The UI of this app is designed to make it usable for everyone. However, powerful customization of the algorithm and interface is still possible over the advanced settings.

## Installation
To install this app, you can download a built debug APK from the [release section](https://github.com/VirtCode/SmartMouse/releases). This APK can easily be installed on your Android device by just opening it. In some cases, sideloading must be enabled in the device settings in to install it.
The app can currently be installed via two methods:
- Download a built APK from the [release section](https://github.com/VirtCode/SmartMouse/releases) and open it on your device.
- The app is available in the [IzzyOnDroid F-Droid Repository](https://apt.izzysoft.de/fdroid/index/apk/ch.virt.smartphonemouse/). See the [webpage](https://apt.izzysoft.de/fdroid/index/info) for how to add this repository to your F-Droid App.

After installation, the app should be self-explanatory. First, add your computer to the devices on the "Connect" page. Then connect to it and open the "Mouse" page. Now you can use your device just like a normal mouse, by moving it on a surface and using the touchscreen to click and scroll.

## Screenshots
<details>
<summary>Expand to view some screenshots!</summary>

<p float="left">
<img alt="Use the mouse buttons on the touch screen" src="brand/screenshots/mouse.jpg" width="30%">
<img alt="Connect to different devices" src="brand/screenshots/device-selection.jpg" width="30%">
<img alt="Configure the algorithm extensively" src="brand/screenshots/movement-settings.jpg" width="30%">
</p>

</details>

## Processing Algorithm
This app uses a custom sensor-fusion algorithm to estimate the position of the device that is developed specifically for mouse-like movements.

Expand Down
36 changes: 20 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,39 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
namespace 'ch.virt.smartphonemouse'

defaultConfig {
applicationId "ch.virt.smartphonemouse"
minSdkVersion 28
targetSdkVersion 30
versionCode 4
versionName "1.4.0"

// TODO: Upgrade targetSdk version to 32 (turns out to be a ton of work)
//noinspection ExpiredTargetSdkVersion
targetSdk 29
compileSdk 30
minSdk 28

versionCode 5
versionName "1.4.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
storeFile file(System.getenv("KEYSTORE_FILE") ?: "keystore.jks")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
}

buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

repositories {
Expand All @@ -45,12 +55,6 @@ dependencies {
// Material Design
implementation 'com.google.android.material:material:1.3.0'

// Math Libraries
implementation group: 'uk.me.berndporr', name:'iirj', version: '1.3'

// Display Libraries
implementation 'com.jjoe64:graphview:4.2.2'

// Testing
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.virt.smartphonemouse">
>

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
<string name="dialog_add_request_setting_message">In order to see nearby devices, you must have location turn on. If you don\'t want to enable location, you can still add a device manually.</string>
<string name="dialog_add_request_setting_title">Enable Location</string>
<string name="title_about">About</string>
<string name="app_version" translatable="false">1.4.0</string>
<string name="app_version" translatable="false">1.4.1</string>
<string name="about_title_version">Version:&#160;</string>
<string name="about_title_date">Last updated at:&#160;</string>
<string name="app_date" translatable="false">31.03.23</string>
<string name="app_date" translatable="false">14.02.24</string>
<string name="about_explanation">This app tries to make your smartphone usable as a normal computer mouse. It estimates its the position of the Smartphone by processing accelerometer and gyroscope data in its custom sensor-fusion algorithm. However, this estimation is not always correct, which leads to different artifacts and wrong movements of the cursor. Because of that, this app is far from finished and should not be treated as a finished product.</string>
<string name="about_github">This app is open source and may be found on <a href="https://github.com/VirtCode/SmartMouse">GitHub</a>.</string>
<string name="connect_connecting_disclaimer">If this process is taking too long, you may restart the app and select another device.</string>
Expand Down
Binary file added brand/screenshots/device-selection.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added brand/screenshots/mouse.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added brand/screenshots/movement-settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.android.tools.build:gradle:8.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,7 +15,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':app'
rootProject.name = "Smartphone Mouse"
rootProject.name = "SmartMouse"

0 comments on commit ed64dc1

Please sign in to comment.