Android Question broadcast receiver for when running task has been changed

Discussion in 'Android Questions' started by ArminKH, Jul 23, 2015.

  1. ArminKH

    ArminKH Well-Known Member

    Hi
    I want to create a security locker app which lock each selected programs(unlocked if correct pass entered)like most application which is available on play store
    Now i have a question
    We should listen for running applications and if the runing task be equal to selected package names then we should ask for password
    But how is this possible?
    By using service which is running always?
    Or by using brodcast receiver?
    If we have any receiver please let me to know
    Thank u
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    ArminKH likes this.
  3. ArminKH

    ArminKH Well-Known Member

    excuse me but i'm not sure that i understand exactly
    Os library has internal service?where we could check os library for running apps?in additional service?
    Can we have any sample?i want my activity starts when my special package name is running
    Where we can listen for this intent?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    The OS library includes (partially working) methods that allow you to find the current running processes. You can use it from a service if you want.
     
    ArminKH likes this.
  5. ArminKH

    ArminKH Well-Known Member

    Thank u but then our service must be always running and this is not good for batery life
    And also maybe os kill that service
    My goal is a way like gcm solution which has a permission in manifest and has a internal listener and if any gcm message arrived then our service starts
    Now i want to do this for running apps and if running app has been changed then my service starts for check package name,etc...
    This is not possible?
     
    Last edited: Jul 24, 2015
  6. ArminKH

    ArminKH Well-Known Member

    THIS is my favorite locker app which has this permissions
    is this using service?
    Screenshot_2015-07-24-12-19-31.png
     
    Last edited: Jul 24, 2015
  7. ArminKH

    ArminKH Well-Known Member

  8. DonManfred

    DonManfred Expert Licensed User

    Last edited: Jul 31, 2015
Loading...