Preparations before Android project development (2): android Project Development
Integrate Android into my life!
In the previous article, I introduced some preparations before development. Because the length is too long and it is hard for everyone to watch, all my blogs will not be too long in the future. If it is too long, I will introduce it in several stages. Okay, no need to talk about it. Continue with the previous article!
1: All network requests must be processed by one method. The callback interface is used to process the returned data. The network status is determined before the request. If there is no network, the system returns the data directly.
This greatly reduces the power consumption of applications. By the way, the most frequently consumed applications are network connections, GPS, and various sensors. You can check these sensors to improve our efficiency.
APP performance!
2: some important global variables should be stored in their own applications. When the Application returns, the attributes of the Constants constant class may be recycled. If the access continues, the obtained value may be null, And the variables will not be recycled even if the Application returns!