The use of Android anonymous shared memory

Note: The content of this article is reproduced from the following article: The use of anonymous shared memory in Android How does the drawing of Android View pass data to SurfaceFlinger? When communicating across processes, how to transfer data larger than 1MB? Using Anonymous shared memory (Ashmem) is a good choice. It can not only […]

Launcher3 custom desktop application [Android13 version]

Article directory summary Change default layout Dynamically add apps to the home screen in code summary Summary Launcher3 project address: AOSP source code/packages/apps/Launcher3 Launcher3 customizes desktop applications. I currently have two methods in practice: Change the default layout file and specify which apps to add to the home screen Dynamically add apps to the home […]

Android network technology

Usage of WebView: We don’t need to set too many properties here: WebView is used to display web pages Display web content: Developers can use WebView to load and display web pages, allowing users to browse website content within the app without leaving the app. Embed third-party content: WebView is also used to embed third-party […]

Android nested transactions

Rotating the device at this time will still reset the stopwatch. Android recreates the activity when rotating the device. If your activity contains a element, it will reinsert a new version of the fragment each time the activity is recreated. Old fragments are discarded and all instance variables are set to their initial values. In […]

Android-Battery Optimization

Battery Optimization Hardware features of Android l Fingerprint sensor l Heart rhythm monitoring l Ambient light sensor l Temperature and humidity sensor l Barometer l N F C l Gyroscope l Accelerometer l Bluetooth l W i – F i l FM/Cellular Radio l Front/rear camera l G P S l Magnetic field detector l […]

Android-Mobile network optimization

Mobile web optimization Foreword First of all, reducing latency through persistent connections, nearby access (such as CDN), optimized TLS deployment, and other protocol optimization strategies is more important for mobile applications. However, for mobile applications, both latency and throughput are more important. In the practice of mobile application development, it is necessary to consider how […]

Android implements the function of converting signatures into pictures and printing

Android implements signatures, converts them into pictures and prints them out Android implements signature function Customize a signature canvas panel Write a signature page layout Some logic and function implementation required when signing in activity Display and print the signed image Other pages receive data and display it Print signature Picture retouching Android implements signature […]

android linkToDeath memory leak analysis

? Register the recipient for a notification if this binder goes away. //Register the notification of the death of binder public void linkToDeath(@NonNull DeathRecipient recipient, int flags) throws RemoteException; On-site reproduction The implementation in the SDK is provided to third-party applications, while a Manager singleton is provided to the outside world. private final IBinder.DeathRecipient mDeathRecipient […]

Android componentization tool-SPI

Foreword SPI: service provider interface uses interfaces, configuration files and strategy patterns to achieve decoupling, modularization and componentization. Usage of ServiceLoader Define an interface class in the public module or interface module; public interface ILogInterface{<!– –> void logD(String msg) } In the actual business module, write an implementation class of the interface; public […]