|
|
@ -48,6 +48,12 @@ class WebService : BaseService() { |
|
|
|
override fun onDestroy() { |
|
|
|
override fun onDestroy() { |
|
|
|
super.onDestroy() |
|
|
|
super.onDestroy() |
|
|
|
isRun = false |
|
|
|
isRun = false |
|
|
|
|
|
|
|
if (httpServer?.isAlive == true) { |
|
|
|
|
|
|
|
httpServer?.stop() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (webSocketServer?.isAlive == true) { |
|
|
|
|
|
|
|
webSocketServer?.stop() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { |
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { |
|
|
@ -112,4 +118,4 @@ class WebService : BaseService() { |
|
|
|
val notification = builder.build() |
|
|
|
val notification = builder.build() |
|
|
|
startForeground(AppConst.notificationIdWeb, notification) |
|
|
|
startForeground(AppConst.notificationIdWeb, notification) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|