process - Default/System Android Processes -
process - Default/System Android Processes -
i working on android project monitors applications user running , cross-checks corresponding processes whitelist stored internally on device.
in order create work, need know default or scheme processes device can add together them whitelist. beingness said, have few questions hoping might able answer:
is there way differentiate between default/system process must running, , process belongs app on device?
are there different default/system processes depending on phone/version of android user running?
if so, process names available somewhere developer use? or there other way obtain them?
if need elaborate more please allow me know, help.
let's seek activitymanager
, getrunningappprocesses()
. iterate on array of runningappprocessinfo
objects , find importance
of importance_foreground
. if docs right (haven't tried this), there should 1 process importance_foreground
-- 1 in ui foreground.
(services can phone call startforeground()
method foreground priority, guessing have importance_perceptible
)
you examine pkglist
of foreground process , compare against whitelist.
however, breaks downwards if:
something pops asynchronously (alarm clock app, incoming phone call, etc.)
an app logically in whitelist has changes impact bundle name (e.g., developer released "pro" app pupil paid for, , whitelist has free app)
if device has multiple visible items (e.g., samsung's multi-window capabilities), if visible apps not importance_foreground
this @ to the lowest degree gets rid of problem of pure background stuff pupil cannot control, including "default/system processes".
however, requires continuously poll, serious detriment battery life. that, plus privacy implications, means me app should, @ best, used exams, , should pupil can install shortly before exam , remove shortly after exam.
android process
Comments
Post a Comment