1

I'm working on my presentation about Windows Phone 8 and I'm wondering about multitasking.

I've read about scheduled task types and one of them is "PeriodicTask", but it fires only once about 30 minutes.

Then Skype crossed my mind - how skype calls work? How it is possible, that Windows Phone intercepts a call, when application works in the background. Consider that it's impossible to have continuously checking in the background.

Is it somehow done by Microsoft or can regular developer achieve something like this? I think, that it's some kind of cooperation between Skype and Microsoft, because as far as I know showing calls is impossible to do by a regular application.

So my guess is that call is a push notification, which Windows Phone receives and shows a calling user.

EDIT:
The only applications which can execute tasks more frequently than ~30 minutes are these with location tracking: Execute task even in the background

Cœur
  • 37,241
  • 25
  • 195
  • 267
Wojciech Kulik
  • 7,823
  • 6
  • 41
  • 67

1 Answers1

0

It's possible because of VoIP API available on Windows Phone 8. It works on notifications, so you don't have to check if there is an incoming call - your app will be notified about one by the system.

Read more on MSDN: VoIP apps for Windows Phone 8.

Btw. there is no VoIP API on WP7/WP7.5 and that's why Skype on these systems works just terrible.

MarcinJuraszek
  • 124,003
  • 15
  • 196
  • 263
  • Is there any other possibility to receive notifications in the background? It seems, that it's impossible, but I'm not sure: [unsupported API](http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202962%28v=vs.105%29.aspx) I've read that you can trigger background agent by notification, but it was probably only for Windows 8. – Wojciech Kulik Nov 02 '13 at 18:12
  • Yes, there is. It's called *Push notifications* and you can find more info here: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402558(v=vs.105).aspx – MarcinJuraszek Nov 02 '13 at 20:50
  • Actually I was asking about push notifications ;-), but I meant if it is possible to receive raw push notification in the background task, becausue TileNotifications and ToastNotifications are handled automatically by WP. I know that it's possible on Windows 8, but according to my link from the first comment - push notifications api is unsupported in scheduled agents. – Wojciech Kulik Nov 02 '13 at 21:04