Environment considerations for Android Client Design

Source: Internet
Author: User

I've done two or three Android client apps for the whole design and part of the coding, here just to talk about the design story (this is the original 2015:11:02).

To do the client design, the first thing to consider the application environment, including three aspects: 1 to design the APK is in a low memory, low running rate, multi-application co-operation (now many applications are in the background has been surviving, undead bird) environment; 2 The APK to be designed needs to call the system other data or function interface; 3 APK in the overall mobile phone operating environment, the inevitable changes in the state of the mobile phone, will affect the operation of the APK, such as open network, screen off screen and so on.

From the outset, it must be at the beginning of the design, from the data stream to consider the memory of the APK run time to hold the amount of data to be small, unused data to try not to load into memory, used data as far as possible to release. Because data can occupy memory all the time, there are two problems: one is to cause the program to run slower, and the consistency of the two data will be challenged. It should be noted here that some buger think that the data has been occupied in memory, will reduce the access path, thereby increasing speed, but through the first-hand experience, loading data from the database and loading a small amount of data in memory, do not feel the difference. But a lot of data occupy memory, it will make its own memory tight, run will be Kaka, but also need to spend thread maintenance database, memory, interface data consistent. So I think the disadvantage factor is greater than the favorable factor.

From the other hand, the design of the APK may be due to business needs, call other shared data or function interface, such as contact data, SMS data, calendar data, or video functions, photo function, call function. These interfaces need to be listed at the beginning of the design, and it is best to test the correctness of these interfaces to ensure that the functionality meets the requirements. Theoretically, these belong to the standard interface, should not have problems, but the individual manufacturers of mobile phones are not necessarily able to fully guarantee. In addition, some special hardware devices may have different interfaces for each provider.

From the beginning, the APK will be at runtime, may be subject to changes in the status of the phone, when receiving these changes, you need to do a corresponding strategy at the business level. For example, when opening and breaking the network, and server interaction should be how to deal with. Processing when the APK is switched to the background, and so on. These need to be prepared in advance at the business level to avoid two meaning in the subsequent process.

To sum up, before the design, need to consider the environmental factors, the more fully considered, the easier the design, do not leave the problem to the late.

Environment considerations for Android Client Design

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.