Some changes for compatibility within current Android SDK. Plus support for Android ICS++ (without this modification, will show NetworkOnMainThreadException)