Google recently introduced the push-to-device service, but it is only available 2.2 or more.
I need a similar system in my application, and I'm trying to get around the limitations.
The problem is battery life. Since the user needs to immediately report changes on the server, I decided to implement a service that will live in the background (the standard Android service) and request a server for updates.
Of course, a server request, even every second, will cost a lot of bandwidth, as well as battery, so my question is: does it matter if the server holds the answer for a certain period of time? (idea of โโajax request of type Comet)
It works as follows:
It will certainly cost less bandwidth, but will it consume less (or even more) battery?
TCP (, , HTTP), , , . , , HTTP-. Bayeux HTTP push. , Android . , , . , , ( ), .
, , . , . - , , . , -. . , , - , HTTP ..
, . , . , . , ? , ? . , , - , , .
, , , , , . , , , , . , , , , , , .
, , , , . , - (, WAIT_TIME 1 1 ) , ?
Source: https://habr.com/ru/post/1783656/More articles:How to create the latest file list in Delphi 2009? - delphiclockwise / counterclockwise rotation when touched - iphoneCGI does not execute python internal server error - 500 - pythonsend via $ .post data + serialized form - jqueryDisplay calendar by date - javaAnt concat task ะถะฐะปัะตััั ะฝะฐ ะพััััััะฒัััะธะต ัะฐะนะปั - concatenationdelete rows using the sql 'like' command, using data from another table - sqlPIE.htc and jQuery conflict animation? - jqueryASP.NET login for subdomain from parent domain - authenticationMap interface from Java question - javaAll Articles