Skip to content

Enable Android "Screen saver" (DreamService) support#16

Open
brad wants to merge 4 commits into
micw:masterfrom
brad:feature/dream-service
Open

Enable Android "Screen saver" (DreamService) support#16
brad wants to merge 4 commits into
micw:masterfrom
brad:feature/dream-service

Conversation

@brad

@brad brad commented Jun 30, 2026

Copy link
Copy Markdown

Implemented a native Android DreamService (PhotoFrameDreamService) that launches the app's MainActivity when the screen saver is activated. This allows users to select "Open Photo Frame" as their system screen saver. I have nightly releases built by github actions in my clone if you wanna try. I threw this together willy nilly with Jules, and am not an Android developer so I apologize if I didn't do something right. Happy to address any feedback. Thanks for the nice app 👍

Summary of changes:

  • Created android/app/src/main/res/xml/dream_info.xml for service configuration.

  • Implemented PhotoFrameDreamService in Kotlin to handle service startup.

  • Added a dream_label string resource for the screen saver name.

  • Registered the service in AndroidManifest.xml.

  • Keep track of whether the app was launched as a dream service and if so

    • Open straight to photos
    • Tap on center exits the app rather than going to the settings page

    Preview

Screenshot_2026-06-29-18-27-01-388

brad and others added 4 commits June 29, 2026 17:55
…13193880336557798301

Enable Android "Screen saver" (DreamService) support
- Added 'is_dream' flag to Intent in PhotoFrameDreamService
- Track isDreamMode in MainActivity and expose via MethodChannel
- Implement 'exitApp' native method to finish activity and remove task
- Update SlideshowScreen to exit app on center tap when in dream mode
- Update localizations for 'Tap to exit' message

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: brad <1614+brad@users.noreply.github.com>
When the app is triggered in dream/screensaver mode, it now automatically
pops any active routes (like the settings screen) to ensure the photo
slideshow is displayed immediately.

Modified lib/ui/screens/slideshow_screen.dart:
- Updated _checkDreamMode() to call Navigator.popUntil when dream mode is detected.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: brad <1614+brad@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant