Matthias Nott
2026-07-05 f28cf788428c8ab4465e51c62b63fc038b8d2971
refs
author Matthias Nott <mnott@mnsoft.org>
Sunday, July 5, 2026 13:29 +0200
committer Matthias Nott <mnott@mnsoft.org>
Sunday, July 5, 2026 13:29 +0200
commitf28cf788428c8ab4465e51c62b63fc038b8d2971
tree bfe95e7d0aefceb337702894a107db1952f1d00b tree | zip | gz
parent 39392618ecfeb89576387b0229fd1ebee6229946 view | diff
Refactor upgrade flow and add debug state request handling

Summary:
- Replace direct IAP purchase with dedicated paywall screen
- Add MQTT debug state request/response protocol
- Add build-time flag to force free tier for screenshots

lib/screens/settings_screen.dart:
- Import `PaywallScreen`
- Refactor `_handleUpgrade()` to navigate to fullscreen paywall
dialog instead of directly calling purchase service
- Remove `_iapLoading` state management from upgrade handler

lib/services/mqtt_service.dart:
- Add `onDebugStateRequest` callback property for handling
server-initiated debug state requests
- Intercept 'debug_state_request' messages in
pailot/control/out topic handler before forwarding to UI
- Add `publishDebugStateResponse()` method to send collected
session state back to broker on pailot/control/in
- Response includes requestId, active session, session list,
app version, and platform metadata
- Add debug logging for request/response flow

lib/services/purchase_service.dart:
- Add PAILOT_FORCE_FREE build-time environment variable
- When set, force `_isPro` to false and persist to cache
- Enables capturing free-tier screenshots for store listings
- Override executes after loading cached state but before
platform reconciliation
3 files modified
46 files added
changed files
android/build/reports/problems/problems-report.html diff | view | blame | history
lib/screens/paywall_screen.dart diff | view | blame | history
lib/screens/settings_screen.dart diff | view | blame | history
lib/services/mqtt_service.dart diff | view | blame | history
lib/services/purchase_service.dart diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/01_splash.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/02_sessions.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/03_voice_chat.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/04_text_chat.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/05_navigate.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/06_settings_connection.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/07_pro_in_settings.png diff | view | blame | history
store-assets/appstore/iphone-6.5-ordered/08_paywall.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/01_voice_chat.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/02_text_chat.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/03_sessions.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/04_navigate.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/05_pro_settings.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/06_settings.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/07_splash.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/08_purchase_a.png diff | view | blame | history
store-assets/appstore/iphone-6.9-ordered/09_purchase_b.png diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_01.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_02.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_03.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_04.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_05.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_06.PNG diff | view | blame | history
store-assets/appstore/iphone-6.9/pailot_07.PNG diff | view | blame | history
store-assets/asc-cheatsheet.md diff | view | blame | history
store-assets/listing-copy.md diff | view | blame | history
store-assets/play-content-cheatsheet.md diff | view | blame | history
store-assets/playstore/feature/pailot_feature_1024x500.png diff | view | blame | history
store-assets/playstore/icon/pailot_icon_512.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/01_voice_chat.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/02_text_chat.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/03_sessions.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/04_navigate.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/05_paywall.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/06_pro_in_settings.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/07_settings_connection.png diff | view | blame | history
store-assets/playstore/screenshots-ordered/08_splash.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_01_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_02_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_03_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_04_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_05_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_06_play.png diff | view | blame | history
store-assets/playstore/screenshots/pailot_07_play.png diff | view | blame | history