Summary of the key points and difficulties encountered in Android development work

1.  Android N floating widget cannot be displayed. Unified management of a window token solves this problem.

 

2.  Pop-up window appears blurry on Android6.0 .

 

3.  Due to the influence of the status bar, the floating window jumps up and down

 

4.  Wi-Fi secure data may be provided by a third party, or provided by the cloud. Therefore, it is necessary to design an extensible interface.

 

5.  According to the vulnerability of http/https , design methods to detect rogue Wi-Fi SSLStrip and SSLSplit .

 

6.  Lottile animation does not support hardware accelerated drawing. Use offline software to draw, and then use hardware acceleration to solve problems.

 

7.  The smart timer scans the records according to the battery, charging, screen and current mobile phone. Choose to trigger or defer until the conditions are met before triggering. This trigger condition and trigger event (plug and unplug the charger or turn off the screen) are configurable. Design is difficult. The final frame consists of trigger , condition and action .

 

8.  Virus pop-up box, the pop-up box that pops up later should be displayed first. Use a stack instead of a list. Also need to gracefully handle home button and activity recycling.

 

9. The  file information service needs to meet the requirements of 3 tab pages at the same time. Use reference counting to manage lifetimes.

 

10. CoordinateLayout does not support inline buttons at the bottom of ViewPager pages. Checked out CoordinateLayout source code to find solution. Listen to the Offset event to dynamically adjust the button position.

 

11. Memory Tuning

* Use dumpsys to view memory usage details.

* Use strict mode to detect leaked acitvity , no closed cursor , etc.

* Use the mat tool to view the specific leak situation and deal with the memory leak problem.

* Some memory leaks are caused by the Android system. ExpandableListView is occupied by inputmanager and not released. WebView is occupied and not released. After such memory leaks are located, it is necessary to find an open API to release resources.

 

12. Battery optimization

* Many Sensors do not have corresponding open APIs , you need to view the source code and use the reflection method to call.

* The BluetoothAdapter of the Bluetooth module must be created in the handlerthread on low-end machines . Asynchronous processing is required and a synchronous interface is opened to the outside.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326162230&siteId=291194637