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
Post a Comment