I am facing some difficulties after adding Websocket Push Services code to my application. I particular
I started getting "Unfortunately ProgramName has stopped" after terminating the app.
The issue is due to some uninitialized variables that are being access by the Service ( please note that there is no issue while the application is running as all these variables are initialized proper during run time ).
I am not sure what I am doing wrong in here, but here is what I have done so far to terminate the service when the application is terminated
Code:
#Region Service Attributes#StartAtBoot: false#StartCommandReturnValue: android.app.Service.START_STICKY#End Region
Code:
Sub Activity_DestroyTry
StopService(WSPushService)Log( "destroyed" )
Catch
Log(LastException)
EndTry
End Sub
I have also commented out: StartServiceAt in Service_Start
I started getting "Unfortunately ProgramName has stopped" after terminating the app.
The issue is due to some uninitialized variables that are being access by the Service ( please note that there is no issue while the application is running as all these variables are initialized proper during run time ).
I am not sure what I am doing wrong in here, but here is what I have done so far to terminate the service when the application is terminated
Code:
#Region Service Attributes#StartAtBoot: false#StartCommandReturnValue: android.app.Service.START_STICKY#End Region
Code:
Sub Activity_DestroyTry
StopService(WSPushService)Log( "destroyed" )
Catch
Log(LastException)
EndTry
End Sub
I have also commented out: StartServiceAt in Service_Start