Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI
on: { pull_request: { } }
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17

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

- name: Build apk
run: |
./gradlew assembleRelease

- name: Build aab
run: |
./gradlew bundleRelease

- name: Upload apk
uses: actions/upload-artifact@v4
with:
name: message-decoder.apk
path: ./app/build/outputs/apk/*/*.apk
retention-days: 7

- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: message-decoder.aab
path: ./app/build/outputs/bundle/*/*.aab
retention-days: 7
72 changes: 72 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release
on: { push: { branches: [ main ], tags: [ 'v*' ] } }
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17

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

- name: Setup android keystore
run: |
base64 -d <<<'${{ secrets.ANDROID_SIGNING_KEY_STORE }}' > android.jks
echo "ANDROID_KEYSTORE_PATH=$GITHUB_WORKSPACE/android.jks" >> $GITHUB_ENV
# Once the path is set, we need to be able to load it
echo "ANDROID_KEYSTORE_PASSWORD=${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}" >> $GITHUB_ENV
echo "ANDROID_KEYSTORE_KEY_NAME=Github CI" >> $GITHUB_ENV
echo "ANDROID_KEYSTORE_KEY_PASSWORD=${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}" >> $GITHUB_ENV

- name: Update version code
run: |
./gradlew increaseVersionCode

git config user.email "ci-update-version-code[bot]@users.noreply.github.com"
git config user.name "ci-update-version-code[bot]"

git add version.properties
git commit -m 'Increase version code'

git push origin ${{ github.ref }}
if: "!startsWith(github.ref, 'refs/tags/')"

- name: Update version.properties for release
run: |
sed -i 's/VERSION_NAME=.*/VERSION_NAME='${GITHUB_REF##*/}'/g' version.properties
sed -i 's/VERSION_CODE=.*/VERSION_CODE=1/g' version.properties
if: "startsWith(github.ref, 'refs/tags/')"


- name: Build apk
run: |
./gradlew assembleRelease

- name: Build aab
run: |
./gradlew bundleRelease

- name: Publish beta release
run: |
./gradlew publishReleaseBundle --track 'internal' --release-name '${{ github.sha }}'
env:
ANDROID_PUBLISHER_CREDENTIALS: '${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}'
if: "!startsWith(github.ref, 'refs/tags/')"

- name: Publish named release
run: |
./gradlew publishReleaseBundle --track 'production' --release-name "${GITHUB_REF##*/}"
env:
ANDROID_PUBLISHER_CREDENTIALS: '${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}'
if: "startsWith(github.ref, 'refs/tags/')"
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Sailing with Damian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# message-decoder
Message decoder for InReach Proxy
# Message Decoder

This project supports decoding of multi-part messages sent via inreach-proxy.

Expected input format:
`m:grib:1:2:Awetwet==`
`m:grib:2:2:Awetwet==`

Output: `GRIB` file saved to storage.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
99 changes: 99 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import java.io.FileInputStream
import java.util.Properties

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
id("com.github.triplet.play") version "3.12.1"
}

val versionProperties = Properties().apply {
load(FileInputStream(rootProject.file("version.properties")))
}

val signingKeystorePath = file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "keystore.jks")

android {
namespace = "eu.sailwithdamian.message_decoder"
compileSdk = 35

defaultConfig {
applicationId = "eu.sailwithdamian.MessageDecoder"
minSdk = 33
targetSdk = 35
versionCode = versionProperties["VERSION_CODE"].toString().toInt()
versionName = versionProperties["VERSION_NAME"].toString()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
if (signingKeystorePath.exists()) {
create("release") {
storeFile = signingKeystorePath
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD")
keyAlias = System.getenv("ANDROID_KEYSTORE_KEY_NAME")
keyPassword = System.getenv("ANDROID_KEYSTORE_KEY_PASSWORD")
}
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
if (file(signingKeystorePath).exists()) {
signingConfig = signingConfigs.getByName("release")
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
bundle {
storeArchive {
enable = true
}
}
}

dependencies {

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}

tasks.register("increaseVersionCode") {
doLast {
versionProperties["VERSION_CODE"] =
(versionProperties["VERSION_CODE"].toString().toInt() + 1).toString()
rootProject.file("version.properties").writer().use { writer ->
versionProperties.store(writer, null)
}
}
}

play {
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
30 changes: 30 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MessageDecoder"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.MessageDecoder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package eu.sailwithdamian.message_decoder

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import eu.sailwithdamian.message_decoder.ui.DecoderScreen
import eu.sailwithdamian.message_decoder.ui.DecoderTheme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()

setContent {
DecoderTheme {
DecoderScreen()
}
}
}
}
Loading