Hello everyone,
I'm trying to develop my first app for the smartphone business.
The purpose is to send to a central SQL database the coordinates of longitude and latitude of each business smartphone available.
Currently I have developed the first part of the app and I can write to the SQL database via a web service properly instantiated. If I try to use the web service within the periodic task of the app that does not work. Do you have any idea?
This code
Protected Overrides Sub OnInvoke(Task As ScheduledTask)
Dim d61 As New sr.d61SoapClient
d61.AGGIUNGI_DATOAsync("param1", "param2", "param3", "param4")
#If DEBUG_AGENT Then
ScheduledActionService.LaunchForTest(Task.Name, TimeSpan.FromSeconds(20))
#End If
NotifyComplete()
End Sub
I have no error message.
When I use Windows Phone Emulator I have no error, the task is operating normally.
If you use the code
Dim d61 As New sr.d61SoapClient
d61.AGGIUNGI_DATOAsync("param1", "param2", "param3", "param4")
under a click button in my MainPage my web service works correctly, if I use the code in the Periodic Task does not work.
Can you help?