Skip to content

Add explicit Start / Stop Service control#68

Open
RafhaanShah wants to merge 1 commit intoshrimqy:masterfrom
RafhaanShah:service-control
Open

Add explicit Start / Stop Service control#68
RafhaanShah wants to merge 1 commit intoshrimqy:masterfrom
RafhaanShah:service-control

Conversation

@RafhaanShah
Copy link
Copy Markdown
Contributor

Currently there's no way to fully exit the app / service, as the service starts on boot and is separate from the app UI

This PR adds support for starting and stopping the service via intents from 3rd party apps (e.g. Tasker)

Additionally adds a settings menu option to fully quit the app and service as well, addressing #61

If the service is stopped, it's guaranteed to start when the app launches now, as NetworkManagerImpl will call NetworkService.start()

Let me know if this looks good or if we should change something

Tested START_SERVICE and STOP_SERVICE via Tasker + adb:

./adb shell am startservice -a STOP_SERVICE com.castle.sefirah.debug/sefirah.network.NetworkService 
./adb shell am start-foreground-service -a START_SERVICE com.castle.sefirah.debug/sefirah.network.NetworkService 

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