Closed Eagleseb closed 10 hours ago
Never mind, it seems that startForeground starts services with FOREGROUND_SERVICE_TYPE_MANIFEST
by default and so adding the service entry to the manifest is sufficient.
No need for a PR, closing issue.
Thanks!
Hi @Eagleseb, thanks for reporting the issue. I already had this issue in mind and worked some time ago on the fix, but I didn't release a new version. I'll release v1.3.0
with the service types included in the library's manifest.
that's great, thanks for the fast answer and fix!
Hello, thanks for writing this library. I'm trying to set it up for a wearos app aiming at collecting health data during clinical studies. It turns out the app crashes on most recent watches because the foreground service does not declare the "health" service type.
the following should be added to the app manifest:
and the services started with the following:
as per https://developer.android.com/develop/background-work/services/foreground-services#fgs-prerequisites I can open a PR with the changes if the project is still active when I get some time to test it.