Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0abf2da
fix crash
jackBonadies Aug 29, 2025
fc28e2a
bottom sheet update
jackBonadies Aug 29, 2025
6f113ff
update pull refresh to material3 and remove material2 dependencies.
jackBonadies Aug 29, 2025
60ac018
update selectedids to be in view model, subscribe to port mappings, a…
jackBonadies Aug 29, 2025
9ec9a38
reformat code
jackBonadies Aug 29, 2025
71ad11d
reorg and hoist view model
jackBonadies Aug 30, 2025
f176ed6
fix source sets so the default package is no longer java.com
jackBonadies Aug 30, 2025
105e135
use io dispatcher for work. inject application scope (which is super…
jackBonadies Aug 30, 2025
884fc93
move logs out of upnpclient and into upnprepository. fix return type …
jackBonadies Aug 31, 2025
93ef148
retry delete logic
jackBonadies Aug 31, 2025
9fcb0b0
with dao
jackBonadies Aug 31, 2025
3ebedfd
logger injection with crashlytics support
jackBonadies Sep 1, 2025
af4f3c6
update version
jackBonadies Sep 1, 2025
ecea7cd
fix nullref on timeout
jackBonadies Sep 1, 2025
d47b530
update timeout from 60s to 10s.
jackBonadies Sep 1, 2025
8ce23c4
snackbarmanager architecture
jackBonadies Sep 1, 2025
3ae7f6d
cleanup - no more static for context menu, context, current activity.
jackBonadies Sep 1, 2025
602337f
update mock client. fix bug in snackbarmanager where applicationconte…
jackBonadies Sep 2, 2025
0d71e25
remove unnecessary globalscope
jackBonadies Sep 2, 2025
02e708c
use global shared root scaffold so that toasts will not immediately d…
jackBonadies Sep 3, 2025
9b42a6b
fix crash where android recreates process at log activity with scroll…
jackBonadies Sep 6, 2025
ed00acd
set cannot be saved to savedStateHandle. change to list.
jackBonadies Sep 6, 2025
dbb5158
better logging with breadcrumbs
jackBonadies Sep 6, 2025
9362104
better logging with breadcrumbs for device not found bug
jackBonadies Sep 6, 2025
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
27 changes: 13 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "com.shinjiindustrial.portmapper"
minSdk 21
targetSdk 35
versionCode 7
versionName '1.2.0'
versionCode 8
versionName '1.2.1'
multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -53,16 +53,16 @@ android {
}
sourceSets {
main {
java.srcDirs = ['src/main']
java.srcDirs = ['src/main/java']
}
release {
java.srcDirs = ['src/release']
java.srcDirs = ['src/release/java']
}
release_no_gps {
java.srcDirs = ['src/no_gps']
java.srcDirs = ['src/no_gps/java']
}
debug {
java.srcDirs = ['src/no_gps']
java.srcDirs = ['src/no_gps/java']
}
}
compileOptions {
Expand Down Expand Up @@ -109,14 +109,10 @@ def compose_version = "2.8.2"

dependencies {

implementation("androidx.room:room-runtime:$room_version")

// If this project uses any Kotlin source, use Kotlin Symbol Processing (KSP)
// See Add the KSP plugin to your project
ksp("androidx.room:room-compiler:$room_version")

// optional - Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-runtime:$room_version")
implementation("androidx.room:room-ktx:$room_version")
implementation 'androidx.compose.material3:material3:1.3.2'

implementation 'androidx.core:core-ktx:1.8.0'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
Expand All @@ -127,8 +123,6 @@ dependencies {
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'

implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material:1.9.0'
implementation 'androidx.compose.material:material-icons-extended'
//implementation 'androidx.appcompat:appcompat:1.4.1'
implementation "androidx.datastore:datastore-preferences:1.0.0"
Expand Down Expand Up @@ -190,4 +184,9 @@ dependencies {
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
testImplementation "org.jetbrains.kotlin:kotlin-test:1.7.20"

}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.generateKotlin", "true")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "bdcfcad7c7fe227ce0eb8afe905fba09",
"entities": [
{
"tableName": "port_mappings",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceIp` TEXT NOT NULL, `deviceSignature` TEXT NOT NULL, `externalPort` INTEGER NOT NULL, `protocol` TEXT NOT NULL, `description` TEXT NOT NULL, `internalIp` TEXT NOT NULL, `internalPort` INTEGER NOT NULL, `autorenew` INTEGER NOT NULL, `desiredLeaseDuration` INTEGER NOT NULL, `desiredEnabled` INTEGER NOT NULL, PRIMARY KEY(`deviceIp`, `deviceSignature`, `protocol`, `externalPort`))",
"fields": [
{
"fieldPath": "deviceIp",
"columnName": "deviceIp",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "deviceSignature",
"columnName": "deviceSignature",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "externalPort",
"columnName": "externalPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "protocol",
"columnName": "protocol",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "internalIp",
"columnName": "internalIp",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "internalPort",
"columnName": "internalPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "autoRenew",
"columnName": "autorenew",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "desiredLeaseDuration",
"columnName": "desiredLeaseDuration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "desiredEnabled",
"columnName": "desiredEnabled",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"deviceIp",
"deviceSignature",
"protocol",
"externalPort"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bdcfcad7c7fe227ce0eb8afe905fba09')"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "437b91cca60dc16f3af517e0ca3388a3",
"entities": [
{
"tableName": "port_mappings",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceIp` TEXT NOT NULL, `deviceSignature` TEXT NOT NULL, `externalPort` INTEGER NOT NULL, `protocol` TEXT NOT NULL, `description` TEXT NOT NULL, `internalIp` TEXT NOT NULL, `internalPort` INTEGER NOT NULL, `autorenew` INTEGER NOT NULL, `desiredLeaseDuration` INTEGER NOT NULL, `desiredEnabled` INTEGER NOT NULL, PRIMARY KEY(`deviceIp`, `deviceSignature`, `protocol`, `externalPort`))",
"fields": [
{
"fieldPath": "deviceIp",
"columnName": "deviceIp",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "deviceSignature",
"columnName": "deviceSignature",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "externalPort",
"columnName": "externalPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "protocol",
"columnName": "protocol",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "internalIp",
"columnName": "internalIp",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "internalPort",
"columnName": "internalPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "autoRenew",
"columnName": "autorenew",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "desiredLeaseDuration",
"columnName": "desiredLeaseDuration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "desiredEnabled",
"columnName": "desiredEnabled",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"deviceIp",
"deviceSignature",
"protocol",
"externalPort"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "devices",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceIp` TEXT NOT NULL, `deviceSignature` TEXT NOT NULL, `useWildcardForRemoteHostDelete` INTEGER NOT NULL, PRIMARY KEY(`deviceIp`, `deviceSignature`))",
"fields": [
{
"fieldPath": "deviceIp",
"columnName": "deviceIp",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "deviceSignature",
"columnName": "deviceSignature",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "useWildcardForRemoteHostDelete",
"columnName": "useWildcardForRemoteHostDelete",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"deviceIp",
"deviceSignature"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '437b91cca60dc16f3af517e0ca3388a3')"
]
}
}
18 changes: 9 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?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_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

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

<application
android:name="com.shinjiindustrial.portmapper.PortForwardApplication"
android:allowBackup="true"
Expand All @@ -31,12 +33,10 @@

<activity
android:name="com.shinjiindustrial.portmapper.SettingsActivity"
android:parentActivityName="com.shinjiindustrial.portmapper.MainActivity">
</activity>
android:parentActivityName="com.shinjiindustrial.portmapper.MainActivity"></activity>
<activity
android:name="com.shinjiindustrial.portmapper.LogViewActivity"
android:parentActivityName="com.shinjiindustrial.portmapper.MainActivity">
</activity>
android:parentActivityName="com.shinjiindustrial.portmapper.MainActivity"></activity>

</application>

Expand Down
Loading