G
G
GS32018-11-14 14:14:41
Java
GS3, 2018-11-14 14:14:41

How to make websocket work when android lock screen?

I have an asp web application that uses WebSocket (SignalR - asp core c#).
To communicate with the server, instead of chrome, I made my application based on WebView. the problem is when the device is locked, the application stops all requests and if something happens, no changes are visible.
In chrome, when the device is locked, everything comes.
How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-11-14
@GS3

None, as far as I know. All textbooks write that Android applications should be developed taking into account the fact that the system can terminate it at any time. In addition, constantly holding the connection drains the battery at a tremendous rate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question