Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 946511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:55:45+00:00 2026-05-15T22:55:45+00:00

I would like to know if there is a possibility to detect if the

  • 0

I would like to know if there is a possibility to detect if the user is in call from an application that is currently in background.

Or, receive a notification when the call is ended if the call was initiated from my app.

Or, even more than that – is there a possibility to detect which app is in foreground?
I don’t believe that this is possible but I had to try… 😉

Any info will be appreciated.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:55:47+00:00Added an answer on May 15, 2026 at 10:55 pm

    In CTCallCenter, there is a method, callEventHandler that you can pass a block that will get called when call events happen. In this block, you’ll be passed a CTCall object, and can get the callState. So, you can get a notification when a call is initiated or ended, and handle it appropriately. You can’t get which application initiated the call, but if you set an ivar when you make the call, you can tell that it’s your application that made the call.

    For example:

    CTCallCenter *callCenter = [[CTCallCenter alloc] init];
    callCenter.callEventHandler=^(CTCall* call){
        if (call.callState == CTCallStateDisconnected)
        { 
            //handle disconnect
        }
    };
    

    EDIT: Re-reading your question, you want these events while you are suspended, correct? I don’t think that’s possible.

    From the docs:

    If your application is active when a call event takes place, the system dispatches the event to your handler immediately. However, call events can also take place while your application is suspended. While it is suspended, your application does not receive call events. When your application resumes the active state, it receives a single call event for each call that changed state—no matter how many state changes the call experienced while your application was suspended. The single call event sent to your handler, upon your application returning to the active state, describes the call’s state at that time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if there is any possibility that I can use
I would like to know if there is a possibility of transferring money from
I would like to know if there is any possibility to turn wifi on
I would like to know whether there might be any possibility of some performance
I would like to know, if there is any possibility to write an inner
I would like to know is there any possibility to replace default lock screen
I would like to know, if there is any possibility to return anything, when
I would like to know if there is a possibility to get the list
I would like to know if there's an efficient algorithm to find the greatest
I would like to know if there are any xml coding standards. <?xml version=1.0?>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.