Optimization of Android--- download to get network access more efficient (two)

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Data acquisition in advance

The previously acquired data is an effective method to reduce the independent data transmission session of. It allows a connection based, in a single time period is given, the full load Download all required data.

Through early download, can reduce radio active signal needed to download the data of a large number of. This can not only save battery power, can also improve the delay, reduce the required bandwidth, reduce download time.

Before performing an operation or browse data, through the data pre download required, the application can be reduced by waiting for download and cause delay, so as to improve the user experience.

However, if the excessive use will lead to increased, battery and bandwidth consumption, and download the data too much (download the data not used). Ensure that the application does not wait for the pre acquisition data and delay the application start, is also very important. In practice, this means that the application to handle data gradually, the required or preferred download or processing the application start data.

How to obtain data on pre, likely to download data size and they are used. Summary of the guide is a state machine based on the above, in the current user session, to download the 50% chance to be used data, usually pre acquisition of greater than 6 seconds of data (about 1~2M), matching to download unused data with previously existing data.

You generally only every 2 to 5 minutes to start a download operation, and download the 1 to 5M data in order to obtain data, this is the practice of a good.

Follow this principle, data download - such as video file, should be based on data block, regularly (every 2 to 5 minutes) are downloaded, so that it can advance to enable efficient data acquisition, viewing the image.

Note, pre download should tell the bulk transmission and connection binding, and it will be based on the type and speed of the connection changes.

The following are some examples of practice:

Music Player

You can select the entire album is acquired beforehand, but if the user after hearing the first song stopped, it will waste a lot of bandwidth and battery power.

The method should be, in addition to a song is playing, but also maintain a song cache. For streaming music, don't stay active wireless signal on all the time, so as to maintain the continuous flow of data, to consider the real-time stream using HTTP to transmit audio stream, this can simulate the pre data acquisition methods above.

News reader

Many news applications by selecting the post classification, download only headlines way to view to reduce bandwidth usage, only when the user wants to read, to download the full text, and put the scroll read part to the view.

Using this method, in order to user most reading session, such as read the headlines, change classification, and reading articles and so on, are forced to stay active wireless signal. Not only that, but the switching between the fixed energy state, also can cause significant delay switching the classification or reading.

A better approach is to obtain data, reading a certain number of startup. Beginning with the first group of news headlines and abstract, in ensuring the startup delay and the lowest, and contains the remaining headlines and the text of each article, and the main headline in the list.

Another approach is to each headline, abstract, text and pictures acquired beforehand, --- all articles related usually according to plan in advance to download in the background. The danger of this approach is that, typically consume bandwidth and battery power, and may be downloaded some users never use the content, so be careful to use.

One solution is to complete data download is needed only in the Wi-Fi link, and as far as possible execution in the device while charging. In theThe type of connection to download scheme based on ModifiedDiscussed in detail.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Joanna at November 30, 2013 - 5:44 PM