Making call to server when application is in background in Windows Phone 8 -


i want make http request web server periodically after every 10 secs.

i using timer in application makes http call. when application goes background when user press windows key.. timer stops

can continue making call web server?

i referred void chatter box application, looks voip application only.

regards,

srs

you have make taskagent inherits scheduledtaskagent , override oninvoke() method. need add task wmappmanifest.xml

<deployment ...> ...   <app ...>     ...     <tasks>       <defaulttask name="_default" navigationpage="mainpage.xaml" />       <extendedtask name="backgroundtask">         <backgroundserviceagent name="yourtaskagent" type="yournamespace.yourtaskagent" source="yourtaskagent" specifier="scheduledtaskagent" />       </extendedtask>     </tasks>   ...   </app> ... </deployment> 

your main application cannot continue perform http requests when suspended. more info see msdn on background tasks. however, keep in mind background tasks have limitations in can do. hope helps.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -