codepath / codepath/android_guides

Foreground services not working sometimes in android O and MIUI os

Open
#351 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
28.3k
Forks
6.2k
PR merge metrics
No merged PRs in 30d

Description

I have some question about location tracking and background services like (background/foreground/firebasejobdispatcher/jobshedular/workmanager).

Currently, my app is targetting android 28 version. And I am testing on Android 8.0 now. Above code is working perfectly on pre-O and post-O android version. But getting location after every 1 min.

I am creating foreground service but some devices like **MI, Oneplus** which stop this foreground service.
Is the correct way to get locations or service will run in the background/foreground?

**jobshedular/workmanager** periodic time which is not lesser than 15 min.

Have anyone working on facing the same problem and resolving then please guide me.

Thank you

_Originally posted by @amitdoiphode11 in https://github.com/codepath/android_guides/issues/220#issuecomment-445515533_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.