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

fix(api,service): from intent api, launch record service on foreground #1989

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abdoulayeYATERA
Copy link

Fixes : #1904
As record service uses foreground notification,
replaces the launch of the the record service from intent api.

Uses

executeForeground

Instead of

execute

Please review and ajust (if needed) before merge, as my knowledge of the code base is close to null for now.

Thanks.

@dennisguse
Copy link
Member

That change will work for starting, but may crash for stopping.
startForeground() requires that a service is starting into foreground (if not it throws an exception).
Not sure what happens if the service is already in foreground mode.

@abdoulayeYATERA
Copy link
Author

Yes, good point, what should happen (functionally) if an api intent is received while a regular track recording is on ?

@dennisguse
Copy link
Member

For start: nothing.
For stop: stop the recording.
Vice versa for stop.

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.

When starting OpenTracks via GadgetBridge no data is being recorded
2 participants