How does an Android app use Internet resources?

Source: Internet
Author: User

Idea: Connect to Internet Resources--Analyze XML Resources--use Download Manager to download files

The Internet connectivity model for Android and Java technology for analyzing Internet data sources.

The Internet connectivity model for Android and Java technology for analyzing Internet data sources.

The differences and benefits of a local application for a rich client and thin client (completely dependent on a Web-based solution):

1. The above-mentioned fat client refers to a non-native Android application (or Web-based application); a thin client is a native Android application (or a local application, or an Internet-based application). Or the two are exchanged for definitions, the name is just a salutation, the key is the angle;

2. Bandwidth: For devices with limited bandwidth, static resources such as tablets, layouts, and sounds can be very expensive bandwidth consumers. By creating a local application, you can limit bandwidth requirements to data changes only;

3. Caching: When using a browser-based solution, an unstable Internet connection can lead to unsustainable application availability. Local applications can provide as much functionality as possible by caching data and user actions without real-time connectivity, and can synchronize with the cloud when the connection is re-established;

4. Reduce power consumption: each time the application opens a connection to the server, the wireless device will open (or remain open). Local applications can bundle connections to the network, thereby minimizing the number of connections that are initiated. The longer the network request interval, the longer the wireless device can remain closed.

5. Local features: Android devices are not just a simple platform to run a browser. By creating a local application, you can combine the data available online with the hardware features available on the device to provide a richer user experience.

Optimize the user experience by limiting the amount of data transferred, and ensure that the application is robust enough to handle network outages and bandwidth throttling.

Connect to the network--Request data--Parse the data

Use download Manager as a service to optimize the processing of long-time download operations. It is advisable to use Download Manager in most scenarios to manage download tasks. By using the above example, a download can be further manipulated or queried, including viewing status or cancel the download, you can set the download conditions, such as: to ensure that only connect to the WiFi when the large file download; You can customize the use of download Manager Notification shows the progress and file name of the current download.

Best Practices for downloading data (need to get to a connection) without draining your battery:

When downloading data, the timing and technology used will have a significant impact on battery life. A mobile device consumes a large amount of power when the radio is activated, and whenever a new connection is created to download additional data, the radio device may wake from standby to the active state. In general, it is a good idea to bind the connection and associated download bindings to execute them simultaneously and infrequently. Instead, creating frequent, short-lived connections to download a small amount of data can have the most significant impact on the battery.

How does an Android app use Internet resources?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.