Gson User Guide

This article is compiled from the official Gson User Guide. Gson’s performance is competitive with other JSON frameworks, and being Google-maintained makes it a solid choice for Java/Android JSON processing. Gson is a Java library developed by Google for serializing Java objects to JSON and deserializing JSON strings back to Java objects. ...

June 8, 2015 · 4 min · haoxiqiang

Downloading Android Source Code

Timeliness note: The mirror URLs in this article were valid for a specific period. Both TUNA (Tsinghua) and USTC (Hefei) AOSP mirror addresses have changed multiple times. Always consult each mirror’s official help page for current URLs. AOSP source is enormous (~70GB), making downloads from Google’s official servers via VPN painfully slow. Chinese mirrors offer much faster speeds. ...

June 4, 2015 · 2 min · haoxiqiang

Make Your App the Default SMS App

While using Google Messenger, I noticed it has a “set as default SMS app” feature. Here’s how it works. Starting from Android 4.4 KitKat, Google introduced the default SMS app mechanism. The official reasoning: Some of you have built SMS apps using hidden APIs — a practice we discourage because hidden APIs may be changed or removed and new devices are not tested against them for compatibility. So, to provide you with a fully supported set of APIs for building SMS apps. In short, if you build well and have enough users, Google takes notice and provides official support. ...

May 18, 2015 · 2 min · haoxiqiang

Notes from Reading Android Documentation

A collection of subtle but important details I noticed while reading the Android developer documentation. ...

May 11, 2015 · 3 min · haoxiqiang

Dart Web Apps on Android

Historical note: This article was written in 2015 based on the old Dart toolchain (Dart Editor + Dartium). Dart has since moved entirely to the Flutter ecosystem and the dart CLI toolchain. Content is kept for reference only. You can launch and debug Android web applications built with Dart without pre-compiling to JavaScript. To do this, you need Dart Editor and Dart Content Shell. Dart Content Shell is automatically installed on the Android device. ...

May 5, 2015 · 3 min · haoxiqiang

Cache Algorithms

Cache replacement policies determine which entries to evict when the cache is full. They have a direct impact on system performance. Here is an overview of common cache eviction algorithms. ...

May 5, 2015 · 2 min · haoxiqiang

Strange Problems I Encountered Recently

A collection of obscure Android development issues and their solutions. ...

April 21, 2015 · 1 min · haoxiqiang

Android Data Storage

Android provides several options for persisting data, each suited to different use cases. Choosing the right storage method is critical for your app’s performance, security, and user experience. ...

April 8, 2015 · 3 min · haoxiqiang

Android App Widgets

An App Widget is a miniature application view that can be embedded into other applications (such as the Home screen) and receive periodic updates. Common examples include weather widgets and music player controls. ...

April 1, 2015 · 2 min · haoxiqiang

Android Developer Requirements

Note: This article was written in 2015. Some toolchain details and version numbers are outdated and provided for historical reference only. For current Android development, please refer to Android Studio and the official Android Developers documentation. ...

April 1, 2015 · 1 min · haoxiqiang