Misc utility methods for Android.