Perfect Geocoding Zoom: Part 1
The Problem Ever used the built-in Geocoder class in Android to display a location on a map? If so, you may have found that the geocoder does not provide you with the viewport data needed to zoom the...
View ArticlePerfect Geocoding Zoom: Part 2
The Problem Ever used the built-in Geocoder class in Android to display a location on a map? If so, you may have found that the geocoder does not provide you with the viewport data needed to zoom the...
View ArticleHow to test onSaveInstanceState and onRestoreInstanceState on a real device
Background In its default configuration, the Android OS actively optimizes resources to achieve fast activity loading times. The system makes an effort to retain previously displayed activities in...
View ArticleHow to enable native heap tracking in DDMS
Background When searching for memory leaks, we often need to examine how a process’ memory usage evolves over time. DDMS provides easy-to-use features to track Java virtual machine heap usage....
View ArticleFixing the broken Honeycomb and ICS webview
Background HTML-based Android apps typically load their bundled HTML files into webviews via special android_asset URLs. On Android 3.0+ and Android 4.0, if these android_asset URLs contain parameters...
View ArticleHandling Large Images on Android
The Challenge Did you ever encounter one of these errors while processing large images on Android? OutofMemoryError: bitmap size exceeds VM budget If you have done a fair amount of image work on...
View ArticleCopying EXIF metadata using Sanselan
The Challenge After resizing, rotating, or otherwise modifing an image, you typically want to retain all the EXIF metadata from the original image. Unfortunately the EXIF metadata is not automatically...
View ArticleWhich HTML rendering engine does the JellyBean WebView use?
Background We often work with hybrid Android apps that have both native code (written in Java) and web code (written in HTML /JavaScript). When we do, we often need a quick way to test whether the HTML...
View ArticleState Preservation in Backstack Fragments
Background When adding and restoring fragments to the backstack, additional care must be taken that the fragment lifecycle is properly handled, so instance state preservation works correctly. This post...
View ArticleWorking with PDF forms on Android
Background Traditionally, working with PDF on Android has been hard because there is no PDF support built into the OS. To be able to work with PDF across the major Android OS versions in use, you...
View Article