I am still having trouble with the push service from the websocket examples provided. if I do not touch the examples they seem to work just fine. When I go to extend them and wrap my application around this communication channel I fail terribly. So I need to better understand how this service works.
Here is what I think...
Push service is set to start on boot. i am assuming boot of the device. Not sure how this plays out when using the wifi bridge and debug view to step through or watch what is going on.
then in activity create and resume I have the service started just to be sure.
Sub Activity_Create(FirstTime As Boolean)
StartService(PushService)
Sub Activity_Resume
StartService(PushService)
now if I stop the app the service keeps going. to make sure that the service stops each time so I can restart a fresh copy I put in
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed = True Then
StopService(PushService)
CancelScheduledService(PushService)
End If
End Sub
it looks like the connection is made and the id is passed and the hello msg is received. But that is all that happens. the code just sits in ping/pong loop and the main activity never progresses through the code. Now if i put a break in the activity create sub so I can step through the code then i can step though the setup but the service won't start and my code just skips over the call to send data out the socket.
I must be missing something fundamental to the process. The only change I make is that I have changed is the screen design from the example to the one I use for my app. So I don't visually indicate the status changes in the connection but log it to the log file.
I can't figure out what i am breaking when I go to extend the example. Just doesn't make sense.
thanks
Brad