The role of the application class

Source: Internet
Author: User

In the implementation class of the application class, there is nothing more than doing some initialization program data, checking the running environment, destroying the data, and so on. 1, initialization program data: Commonly used to initialize the means to create a program required directory, set the development platform key, initialize the map information, initialize HTTP or other network-related things, initialize the push and so on.
2, check the operating environment, such as check if there is an SD card, determine the network connection status, check memory and so on.
3. Destroying data is something that was used before the Onterminate () method was destroyed. When it comes to onterminate () This method, which is stated in the official documentation, is the "for use" in emulated process environments. It'll never is called on a production Android device, where processes is removed by simply killing them; No user code (including this callback) was executed when doing so. It is called in a simulated environment and is never called in a real machine. So why do so many app application classes use this method?

The role of the application class

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.