android / android/health-samples

Issue start service at foreground when update targetSdk = 34

Open
#276 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
346
Forks
183
PR merge metrics
No merged PRs in 30d

Description

java.lang.RuntimeException: Unable to bind to service com.everfit.service.ExerciseService@bbeb578 with Intent {
Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.everfit.debug/com.everfit.service.ExerciseService }: app is in background uid UidRecord

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure after setting targetSdk to 34 and inspect the binding path for com.everfit.service.ExerciseService. Use the BackgroundServiceStartNotAllowedException details to trace where the service is started while the app is backgrounded. Done means the sample can bind or start ExerciseService in the reported scenario without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.