简体   繁体   中英

Is it possible for a Windows Phone application communicate with the Web service, if it is not in the foreground state?

Is it possible for a Windows Phone application to receive messages from a web service and respond to them when it is not in foreground? For example, during incoming call. Because if the web service does not receive a response from the client, the client will be disconnected.

That would drain the battery if a user wouldn't shutdown the app. Consider allowing the client to disconnect since mobile applications always disconnect arbitrarily because of signal.

you may run your app in the background if your app is a location tracking application. You may fail certification if you misuse this feature.

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681691(v=vs.105).aspx

I can verify that you can send API request while running in the background.

There is a battery drain issue. You should monitor the battery yourself, if your app notice the battery falling below a certain percentage, you should discontinue making API calls. If you don't the system will do it for you. At least if you do it, you can notify the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM