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

Apps Application that starts working during call

Discussion in 'Android Development' started by uaeHamed, May 25, 2011.

  1. uaeHamed

    uaeHamed Newbie
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    20
    Joined:
    May 22, 2011

    May 22, 2011
    20
    1
    16
    Hi all,

    If I would like to have an application(background or active) to start working when an incoming or outgoing call is started, how do I go about that?
    I just need the basic idea no need for specifics(also it would be greatly appreciated). So basically does this application need to be a server that has a broadcast reciever or something?
     

    Advertisement

  2. miXer

    miXer Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    313
    Joined:
    Aug 12, 2010

    Aug 12, 2010
    313
    51
    53
    Norway
    It needs to be a service to be able to work in the background. And to start the service on incomming or outgoing calls, you can use broadcasts.
     
  3. uaeHamed

    uaeHamed Newbie
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    20
    Joined:
    May 22, 2011

    May 22, 2011
    20
    1
    16
    So my service needs to catch the broadcast that informs all that a call is starting. Thanks!
     
  4. miXer

    miXer Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    313
    Joined:
    Aug 12, 2010

    Aug 12, 2010
    313
    51
    53
    Norway
    You can have a broadcast start the service via startService(), do the work and shut down the service.
     

Share This Page

Loading...