How to check internet access

How to check internet access

Jun 24

If you call a http request, and turns out your internet access is currently down (wifi/3g not turned on), the Android OS responds with a “cannot reach host” type of message however doesn’t cause the application to crash, just stalls – for ages.

To fix this, try using a boolean value as a check for when you have internet access

Screen orientation crashes my app!

Screen orientation crashes my app!

Jun 05

Whilst I was developing my app, I normally had it in a portrait view, but I soon noticed when I changed the orientation to landscape, the entire app kills itself, and rerun’s the activity lifecycle from onCreate().

This causes my app to crash every time a thread was running (when it was looking for a location, or refreshing whilst a progress dialog was displayed)

screen orientation

Click the jump to see how I resolved this issue

ADB Drivers for HTC Desire

ADB Drivers for HTC Desire

Apr 25

If you are trying to use the USB drivers downloaded from the Android SDK, you will notice that they do not work with the HTC Desire.

I even tried to modify the inf file in the USB drivers directory in my android sdk folder, but it wasnt working.

GAHH!!!

Instead, all you need to do is install the drivers via the HTCSync install file found on the SD card (click here to download), then you’re good to go ;)

Make sure you have USB Debugging mode turned on (Settings -> Applications -> Development)

adb device

Page 2 of 212