Skip to content

Commit

Permalink
version 8.0.2, fix minimum sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
spieglt committed Mar 19, 2024
1 parent 099967b commit de9e252
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Android/FlyingCarpet/app/build.gradle
Expand Up @@ -8,10 +8,10 @@ android {

defaultConfig {
applicationId "dev.spiegl.flyingcarpet"
minSdk 23
minSdk 26
targetSdk 34
versionCode 13
versionName "8.0.1"
versionCode 14
versionName "8.0.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Expand Up @@ -33,7 +33,7 @@ class About : DialogFragment() {

const val AboutMessage = """
https://flyingcarpet.spiegl.dev
Version 8.0.1
Version 8.0.2
theron@spiegl.dev
Copyright 2024, Theron Spiegl, all rights reserved.
Expand Down
Expand Up @@ -69,13 +69,22 @@ class MainActivity : AppCompatActivity() {
return
}

val info = viewModel.reservation.softApConfiguration
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
info.wifiSsid?.let { viewModel.ssid = it.toString() }
// get ssid and password
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
val info = viewModel.reservation.wifiConfiguration
info?.let {
viewModel.ssid = it.SSID
viewModel.password = it.preSharedKey
}
} else {
info.ssid?.let { viewModel.ssid = it }
val info = viewModel.reservation.softApConfiguration
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
info.wifiSsid?.let { viewModel.ssid = it.toString() }
} else {
info.ssid?.let { viewModel.ssid = it }
}
info.passphrase?.let { viewModel.password = it }
}
info.passphrase?.let { viewModel.password = it }

// ensure no quotes around the ssid, not sure why this is necessary
viewModel.ssid = viewModel.ssid.replace("\"", "")
Expand Down

0 comments on commit de9e252

Please sign in to comment.