1. Download our Official Android App: Forums for Android!

oom_adj value problem

Discussion in 'Android Lounge' started by naike, Jul 13, 2013.

  1. naike

    naike Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Jul 11, 2013

    Jul 11, 2013
    2
    0
    5
    Hey guys, I have a slight problem.
    I need a way to detect the state of an app (if it's running in the background e.g.) and afaik the only way to check this is with the oom_adj value which is found in proc/(pid)/oom_adj.
    The problem is that every app I try returns the value 0, which means it's in the foreground, even if the app is not running or is running in the background.

    I'm using a i9505 with stock rooted/deoxed rom (I've tried 100% stock everything and get the same issue)
    Any help would be appreciated because I don't know what to do.
     

    Advertisement

  2. LilBit

    LilBit Extreme Android User
    Rank:
    None
    Points:
    533
    Posts:
    5,865
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    5,865
    3,308
    533
    Female
    U.S.A.

Share This Page

Loading...