Android Question Use stable service for b4j socket

Pooya1

Active Member
Licensed User
Hi
My app need to stable service that in all time keep connection in android
I used b4j websocket in service and this service must be active when internet is available
I understood that Starter service is stable service
Can i use this service for connect to server and keep connection?
Thanks
 

Pooya1

Active Member
Licensed User
There is no such term "stable service".

If you want the connection to be kept active then you need to use a foreground service with a partial lock (PhoneWakeState). Expect it to be killed at some point.
This is chat app and must be active in all time
Can i use phone event example connectivityChange or Tick event or other for start service for all time?
 
Upvote 0
Top