-
Notifications
You must be signed in to change notification settings - Fork 116
Use startForegroundService() for the MediaService
#95
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
Conversation
qnga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you! Any chance there is also something to do in https://github.com/readium/kotlin-toolkit/blob/develop/test-app/src/main/java/org/readium/r2/testapp/MediaService.kt?
|
@qnga I guess it would be here:
But I don't think using Like with the previous audio navigator, the media service should be started only when actually playing an audiobook, and stopped when we're done. It needs to be started as "foreground" for the issue raised in #92 but also this:
|
|
Correct, the service is made foreground only when some audiobook is opened. Let's assume that |
|
Fine by me. @mrifni Did you have time to test this PR? |
readium/shared/src/main/java/org/readium/r2/shared/FuelPromiseExtension.kt
Outdated
Show resolved
Hide resolved
|
@mickael-menu this seems to work, can we merge it ? |
Fix #92
Solution found in https://stackoverflow.com/a/47654126