Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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

VB
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

VB
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?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900