Connected Mobile Apps Resource Usage
A great many of the applications I create, run in the background and periodically send or receive information from a server. The Sony Ericsson Developer blog has just published an interesting post today on ‘Reducing power consumption of connected apps’. While the post talks about and provide examples for Android, the techniques can also be applied to some other platforms.
In summary, they are…
- Synchronize your polls with other apps
- Make polls short
- Manage your connections
- Stop your services
Here are some corresponding tips on reducing data usage…
- Optimise your data design to do multiple requests for data in one transaction with the server
- If using HTTP then use HTTP compression
- Allow the user to view how much data has been used and allow them to change polling periods
- Have the server know when the phone was last updated and only send what’s charged rather than ‘everything’
- Avoid XML based web services and use simple HTTP GET, POST and JSON
- Think about using TCP rather than HTTP
- Don’t use SSL unless you really have to (does it really have to be that secure?)
- Where possible, use server initiated notification systems rather than polling
Related Articles: