I have done some research but can’t find a reliable answer to my question.
I need to develop an iPhone app that will be able to monitor call status. I know that the CTCallCenter object lets my app be notified about call connected/disconnected events (which I need), but those notifications do not work when the app goes to the background.
The thing is that I need to monitor call status all the time and when it changes, send the status over the Internet to a server… So the app has to be ‘partly’ active even after it goes to the background. It has to monitor call status all the time and be able to send it over the Internet.
I got an idea to create a thread and make it check call status every second (without using the automatic notifications). But I realised that when the app goes to the background, threads are immediately suspended :(. Pity.
I’m new to iOS development and I have no idea if what I want to achieve is possible. Will you advise me, please?
There are apps (for example ‘Gadu-Gadu’ – a chat client) that present me notifications when somebody sends me a message – even if the app is not running at all. So I suppose it uses some inbuilt iOS mechanisms (the notification centre?). I wonder if this could be a clue for me.
Thanks a lot in advance.
Well you can’t monitor an call status from the background, apple does allow you to monitor all things.
About the notification, Gadu-Gadu probably uses Push notifications.