Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and clarifies services auto-restart #1374

Merged

Conversation

AndreMiras
Copy link
Member

  1. Fixes services auto-restart introduced in add sticky services, auto-restart services, fix foreground option #643:
    onTaskRemoved() stops the service gracefully using stopSelf() when
    it gets killed. That way onDestroy() gets triggered and service will
    restart under different process if auto-restart is enabled.

  2. Documents process behavior and auto-restart usage:
    Emphasis that services are running in a dedicated processes, different
    from the app process, which is not the Android default behavior.
    Adds a code snippet.

1) Fixes services auto-restart introduced in kivy#643:
`onTaskRemoved()` stops the service gracefully using `stopSelf()` when
it gets killed. That way `onDestroy()` gets triggered and service will
restart under different process if auto-restart is enabled.

2) Documents process behavior and auto-restart usage:
Emphasis that services are running in a dedicated processes, different
from the app process, which is not the Android default behavior.
Adds a code snippet.
@AndreMiras
Copy link
Member Author

Build is green ✔️
This pull request doesn't address the sticky flag. At first I also wanted to document this feature as well, but since it still seems broken to me, I'd like to make sure it works first.

@inclement inclement merged commit 098b55e into kivy:master Sep 15, 2018
@inclement
Copy link
Member

Seems a clear improvement, thanks :)

AndreMiras added a commit to AndreMiras/EtherollApp that referenced this pull request Sep 15, 2018
Uses `Service.setAutoRestartService()` to restart service when killed,
refs kivy/python-for-android#1374
AndreMiras added a commit to AndreMiras/EtherollApp that referenced this pull request Sep 15, 2018
Uses `Service.setAutoRestartService()` to restart service when killed,
refs kivy/python-for-android#1374
@AndreMiras AndreMiras deleted the feature/service_auto_restart_fix_and_doc branch February 1, 2019 12:24
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.

2 participants