Tree View Menu with RecyclerView

I had long wanted to write a tree view demo. Previously, I used TreeViewList (a ListView wrapper) or ExpandableListView for multi-level menus. Eventually I realized there is no need for custom views – just use RecyclerView and manage the data flattening yourself. The core idea: recursively flatten a nested data structure into a linear list, then use notifyItemRangeInserted / notifyItemRangeRemoved to handle expand and collapse. ...

December 16, 2015 · 3 min · haoxiqiang

Solving Problems from Error Logs — Bugly Blog Collection

We use Tencent Bugly for crash monitoring in our project. Most crash reporting tools are similar in functionality; Bugly was chosen for its clean statistics dashboard and reliable brand. Here is a curated collection of Bugly’s technical blog posts covering common crash scenarios and analysis approaches. ...

July 29, 2015 · 1 min · haoxiqiang

Common Issues When Customizing Volley

While integrating Volley into a project, I encountered several common issues worth documenting. The following does not apply to Android 2.3 and below. ...

June 9, 2015 · 1 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

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