From a8b49a367245907c6c1acf2486ff9d1bc03b6312 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Mon, 21 Sep 2026 01:14:49 -0700 Subject: [PATCH] Release v0.0.03-pre: weather, template cards, media fallbacks, setup steps - Weather from Open-Meteo with a place name, a forecast screen and a nav bar icon; a fresh location fix is requested when the last one is stale - Map controls are solid, one size, and fade out after four seconds; pinch to zoom works because every finger now reaches the app - Map templates draw their content in a floating card; toggle and radio rows show their state, the Back and Pan actions work, and details text and buttons are larger - Home player gains Lyrics and Minimise buttons; minimised, it lives in the nav bar - Media apps that hide their library show what they are and can still be controlled; apps that refuse Gearslip as a host say why - Debug mode switch, session report in the log, and log sharing as a file attachment - Launcher, phone apps, weather and calendar load at startup - Web app opens DuckDuckGo by default - Home screen lists the setup steps; the launcher marks apps tested and working --- gearslip/build.gradle.kts | 4 +- .../gearslip/CarPreviewActivity.kt | 26 +- gearslip/src/main/AndroidManifest.xml | 11 + .../app/seb3thehacker/gearslip/AppSettings.kt | 13 + .../seb3thehacker/gearslip/CertProvider.kt | 9 +- .../seb3thehacker/gearslip/EncoderSelfTest.kt | 19 +- .../gearslip/GearslipActivity.kt | 21 +- .../app/seb3thehacker/gearslip/GearslipLog.kt | 99 +++++++- .../seb3thehacker/gearslip/GearslipRunner.kt | 205 +++++++++------- .../app/seb3thehacker/gearslip/PhoneTls.kt | 20 +- .../gearslip/ProjectedContent.kt | 8 +- .../app/seb3thehacker/gearslip/Projection.kt | 9 +- .../seb3thehacker/gearslip/ScreenProjector.kt | 34 ++- .../seb3thehacker/gearslip/SessionReport.kt | 129 ++++++++++ .../app/seb3thehacker/gearslip/TlsSelfTest.kt | 17 +- .../app/seb3thehacker/gearslip/VideoSource.kt | 7 +- .../gearslip/car/CarDashboardScreen.kt | 110 +++------ .../gearslip/car/CarHomeScreen.kt | 29 ++- .../seb3thehacker/gearslip/car/CarLauncher.kt | 103 ++++++-- .../gearslip/car/CarNavigator.kt | 26 +- .../gearslip/car/CarSettingsScreen.kt | 2 +- .../app/seb3thehacker/gearslip/car/CarUi.kt | 108 +++++--- .../gearslip/car/MapControlsWake.kt | 38 +++ .../seb3thehacker/gearslip/car/MediaScreen.kt | 60 ++++- .../gearslip/car/PhoneAppsScreen.kt | 4 +- .../seb3thehacker/gearslip/car/Prefetch.kt | 42 ++++ .../gearslip/car/TemplateChrome.kt | 76 ++++-- .../gearslip/car/TemplateContent.kt | 9 +- .../gearslip/car/TemplateParts.kt | 230 +++++++++++++++--- .../app/seb3thehacker/gearslip/car/Weather.kt | 213 ++++++++++++++++ .../seb3thehacker/gearslip/car/WeatherIcon.kt | 101 ++++++++ .../gearslip/car/WeatherScreen.kt | 128 ++++++++++ .../gearslip/host/CarAppConnection.kt | 89 ++++++- .../seb3thehacker/gearslip/host/CarModels.kt | 21 ++ .../seb3thehacker/gearslip/host/KnownApps.kt | 20 ++ .../seb3thehacker/gearslip/media/CarMedia.kt | 77 +++++- .../gearslip/mirror/PhoneApps.kt | 8 + .../gearslip/ui/CarPreviewScreen.kt | 14 +- .../seb3thehacker/gearslip/ui/GearslipApp.kt | 2 +- .../seb3thehacker/gearslip/ui/HomeScreen.kt | 98 +++++++- .../seb3thehacker/gearslip/ui/LogsScreen.kt | 41 +++- gearslip/src/main/res/xml/share_paths.xml | 5 + 42 files changed, 1899 insertions(+), 386 deletions(-) create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/SessionReport.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/car/MapControlsWake.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/car/Prefetch.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/car/Weather.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/car/WeatherIcon.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/car/WeatherScreen.kt create mode 100644 gearslip/src/main/java/app/seb3thehacker/gearslip/host/KnownApps.kt create mode 100644 gearslip/src/main/res/xml/share_paths.xml diff --git a/gearslip/build.gradle.kts b/gearslip/build.gradle.kts index a75a959..1af3c21 100644 --- a/gearslip/build.gradle.kts +++ b/gearslip/build.gradle.kts @@ -32,8 +32,8 @@ android { applicationId = "app.seb3thehacker.gearslip" minSdk = 35 targetSdk = 37 - versionCode = 2 - versionName = "0.0.02-pre" + versionCode = 3 + versionName = "0.0.03-pre" } signingConfigs { diff --git a/gearslip/src/debug/java/app/seb3thehacker/gearslip/CarPreviewActivity.kt b/gearslip/src/debug/java/app/seb3thehacker/gearslip/CarPreviewActivity.kt index 98d483f..3305e4b 100644 --- a/gearslip/src/debug/java/app/seb3thehacker/gearslip/CarPreviewActivity.kt +++ b/gearslip/src/debug/java/app/seb3thehacker/gearslip/CarPreviewActivity.kt @@ -76,6 +76,27 @@ class CarPreviewActivity : ComponentActivity() { GearslipLog.i("preview: wrote ${out.name}") step++ } + // A two-finger pinch: "cx,cy,startGap,endGap" in projected pixels, after "pinchAfter" ms. + intent.getStringExtra("pinch")?.let { spec -> + val (cx, cy, gap0, gap1) = spec.split(",").map { it.toFloat() } + val pair = { gap: Float -> listOf(TouchPoint(3, cx - gap / 2, cy), TouchPoint(7, cx + gap / 2, cy)) } + val after = intent.getIntExtra("pinchAfter", 9000).toLong() + main.postDelayed({ + snap() + p.dispatchTouch(MotionEvent.ACTION_DOWN, 0, listOf(pair(gap0)[0])) + p.dispatchTouch(MotionEvent.ACTION_POINTER_DOWN, 1, pair(gap0)) + val steps = 14 + for (i in 1..steps) main.postDelayed({ + p.dispatchTouch(MotionEvent.ACTION_MOVE, 0, pair(gap0 + (gap1 - gap0) * i / steps)) + }, 40L * i) + main.postDelayed({ + p.dispatchTouch(MotionEvent.ACTION_POINTER_UP, 1, pair(gap1)) + p.dispatchTouch(MotionEvent.ACTION_UP, 0, listOf(pair(gap1)[0])) + }, 40L * (steps + 1)) + main.postDelayed({ snap() }, 40L * (steps + 1) + 2000) + }, after) + } + // Free-running mode: keep snapshotting on a timer so the display can be driven from // outside (adb `am start --display` / `input -d`) while the harness records it. val snaps = intent.getIntExtra("snaps", 0) @@ -89,8 +110,9 @@ class CarPreviewActivity : ComponentActivity() { snap() taps.forEachIndexed { i, (x, y) -> main.postDelayed({ - p.dispatchTouch(MotionEvent.ACTION_DOWN, x, y) - main.postDelayed({ p.dispatchTouch(MotionEvent.ACTION_UP, x, y) }, 80) + val point = listOf(TouchPoint(0, x, y)) + p.dispatchTouch(MotionEvent.ACTION_DOWN, 0, point) + main.postDelayed({ p.dispatchTouch(MotionEvent.ACTION_UP, 0, point) }, 80) }, 2500L * (i + 1)) main.postDelayed({ snap() }, 2500L * (i + 1) + 1500) } diff --git a/gearslip/src/main/AndroidManifest.xml b/gearslip/src/main/AndroidManifest.xml index ad3e91f..6b47070 100644 --- a/gearslip/src/main/AndroidManifest.xml +++ b/gearslip/src/main/AndroidManifest.xml @@ -60,6 +60,17 @@ android:supportsRtl="true" android:theme="@style/Theme.Gearslip"> + + + + + + +