A striking observation which Google did this year on developer conference I / O: make the current generation of Android Apps widely basic mistakes in the way in which contact is made with networks and servers. This is because the architecture cluttered sitting with unnecessary data requests which come at the expense performance and battery life, and the data bundle
Unnecessary requests
.
Google comes through the mouth of app specialist Colt McAnlis, also driver of Android development, with tips on how to improve. Because, according McAnlis, the frequent poor network architecture end up costing customers from developers, or end users money. Network Performance belong according to him the most mistakes of Android developers.
“For every unnecessary request that you make, every non-synchronous packet and every two-bit image that is requested, the user has to pay. Ask Just think that I would tell you that, “McAnlis served up all existing developers and our IDG colleagues at Network World during his presentation at Google I / O 2015.
Colt McAnlis on Twitter
The key to efficient data usage is on two things: less use of the radio chip and less pumping data. One of the ways to deal more effectively here is batching, so McAnlis indicated. This he means that data with less priority should be sent only if the hardware is already enabled for other purposes. This minimizes idle time and thus the power consumption of the chip.
Prefetching
Another solution is prefetching , or data retrieval early smarter. “If you know you have to do eventually six or seven requests, do not wait until the device is in sleep mode, but take advantage of the fact that the chip is currently activated and run the application right out,” advises McAnlis.
Google shows its developer platform has long tips to avoid the empty slurping the battery more efficient network usage. There, the Android developer several best practices for the planning and executing downloads using techniques such as caching and prefetching polling and can be tracked online classes.
Avoid the server
McAnlis added that in its I / O presentation one more thing to add: avoid using the old server to continuously check for updates. “The questioning of the server is appalling. The waste of time by the user. Remember that every time you check the server and it comes back with a packet that tells you that there are no new data, the user pays for here . “
The solution comes with a genuine McAnlis WC-duck advice: according to him, is Google’s own Cloud Messaging in this respect much better
.


No comments:
Post a Comment