Detecting whether an Android device is a tablet or a phone

You’d like your apps to be compatible with as many devices as possible, but at the same time you want to offer as many features as you can on any device. A common problem for Android developers is determining whether you’re running on a tablet or a phone and a common answer is: Define tablet and phone!

The thing is that you shouldn’t care whether you’re running on a tablet or a phone. The real question you need to ask is whether the current device has the ability to support my feature. Continue reading