Skip to content

Add start-on-boot setting, default on (#399) - #400

Merged
easonxiang merged 2 commits into
weenas:mainfrom
easonxiang:add-start-on-boot-setting
Nov 18, 2026
Merged

easonxiang merged 2 commits into
weenas:mainfrom
easonxiang:add-start-on-boot-setting

Conversation

@easonxiang

Copy link
Copy Markdown
Contributor

Closes #399.

Re-adds the start_on_boot preference (default true): CastBay stays ready to receive after the TV boots without opening the app, while users running a second DLNA receiver (e.g. LeanCast on an unrooted Android 6.0 TV, where pm disable is rejected) can turn it off in Settings > General.

  • ReceiverSettings.startOnBoot (default true); ReceiverStarter.start() returns early when it is off, so only background auto-starts (boot broadcast and the periodic network job) are gated — opening the app still starts receiving directly.
  • Toggle + note in Settings > General; strings in EN, ZH and ZH-TW.
  • Setting included in anonymous usage stats.
  • Two new unit tests (startOnBootIsOnByDefault; toggling it does not restart the receiver).

Testing: ReceiverSettingsTest, 8/8 pass locally (kotlinc 2.2.10 against android-36 stubs); the full Gradle build, unit tests and lint run on CI here.

Note: turning the setting off shows no home-screen hint yet (the old UI had one); a visible "receiving off" hint can follow if wanted.

easonxiang and others added 2 commits November 18, 2026 09:35
Re-adds the start_on_boot preference (default true), gated in
ReceiverStarter so it only stops background auto-starts (boot broadcast
and the periodic network job); opening the app still starts receiving
directly. Adds the toggle to Settings > General, strings in EN/ZH/ZH-TW,
the setting to anonymous usage stats, and two unit tests.
@easonxiang
easonxiang merged commit 9939d97 into weenas:main Nov 18, 2026
9 checks passed
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