Devv Active Member Licensed User Longtime User Oct 9, 2015 #1 hi I'am making an anti theft app. the app must always contact my http server to get commands I was using httpsultis and a timer ,each 3 mins to do http get and check my site for commamds. but this method is so battery consuming on some phones it took about 25% of the battery any other methods that is less batter hungry ? with keeping a 3 minutes refresh rate all ideas are welcomed
hi I'am making an anti theft app. the app must always contact my http server to get commands I was using httpsultis and a timer ,each 3 mins to do http get and check my site for commamds. but this method is so battery consuming on some phones it took about 25% of the battery any other methods that is less batter hungry ? with keeping a 3 minutes refresh rate all ideas are welcomed
R Roycefer Well-Known Member Licensed User Longtime User Oct 10, 2015 #2 Using WebSockets might cut down on the bandwidth usage but I suspect the bulk of the battery draining isn't from powering the radio unnecessarily with the overhead of HTTP GET requests but rather that 3 minute refresh rates are preventing the CPU from entering sleep mode. But it can't hurt to try it and see if it improves battery performance. Upvote 0
Using WebSockets might cut down on the bandwidth usage but I suspect the bulk of the battery draining isn't from powering the radio unnecessarily with the overhead of HTTP GET requests but rather that 3 minute refresh rates are preventing the CPU from entering sleep mode. But it can't hurt to try it and see if it improves battery performance.
incendio Well-Known Member Licensed User Longtime User Oct 14, 2015 #3 I also think, it is the timer that consume battery a lot. Why not change timer to some action, for example when users clicked menu, app contact your server, etc. Upvote 0
I also think, it is the timer that consume battery a lot. Why not change timer to some action, for example when users clicked menu, app contact your server, etc.