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