1

I used the NSNotificationcenter to implement an event listener on a change in connectivity. When the user connects or disconnects from a WiFi network. Is it possible for this notification to be sent to the app while the app is in suspended mode?

It must be possible to do this, thinking about Skype for example how do it receive an incoming Skype call?

This is how I add my observer

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(reachabilityChanged:)
                                             name:kReachabilityChangedNotification
                                           object:nil];
4

1 回答 1

2

不,常规应用程序不可能。Skype 将注册为 voip 类型的后台应用程序,它比常规应用程序具有更多在后台执行的能力。有 4 种类型的后台应用程序:音频、voip、位置、报摊。

如果应用程序不是这些类型之一,那么如果它被暂停,它可以再次执行的唯一方法是通过用户点击应用程序的图标或响应本地或远程通知。

于 2012-06-05T03:09:09.643 回答