wenmingvs/AndroidProcess
判断App位于前台或者后台的6种方法 observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3879
- days_rel: n/a
- days_push: 1454
- n_releases_24m: 0
Adoption not part of the score
2762 stars · 497 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
An Android Java library that packages six different methods for detecting whether an app is in the foreground or background, exposed as a utility class. It includes techniques ranging from ActivityLifecycleCallbacks to reading /proc data, some of which can detect other apps' foreground state.
Use cases
- detect if my android app is in foreground or background
- check whether another app is running in the foreground on android
- track app foreground state with activity lifecycle callbacks
- get foreground app package name without permissions
- compare methods for detecting android app background state
When to choose
- you need a quick utility to know if your own app is foregrounded
- you want to compare multiple foreground-detection strategies in one place
- you need to detect other apps' foreground state on older Android versions
When to avoid
- you target modern Android versions where most cross-app detection methods are blocked
- you need a maintained, actively updated solution
- you only need simple lifecycle tracking that ProcessLifecycleOwner already provides
Facets
library · maturity maintenance
developer-tools sdk android-tools mobile-development developer-tools jvm foreground-detection background-detection app-state activity-lifecycle usagestats android
1 source
- readme: https://github.com/wenmingvs/AndroidProcess · fetched 2026-08-28 · 5218e9274f13
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| wenmingvs/AndroidProcess | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="wenmingvs/AndroidProcess")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem