Re: the tangent above on how to tell a phone from a non-phone: as far as I know, only a phone has a 15-digit IMEI (International Mobile Station Equipment Identity), so the following code will definitively distinguish a phone from a non-phone:
TelephonyManager manager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
String deviceInfo = "";
deviceInfo += manager.getDeviceId(); // the IMEI
Log.d(TAG, "IMEI or unique ID is " + deviceInfo);
if (manager.getDeviceId() == null) {
Log.d(TAG, "This device is NOT a phone");
} else {
Log.d(TAG, "This device is a phone.");
}
I have found that on a Nook emulator getPhoneType() returns a phoneType of "GSM" for some reason, so it appears checking for phone type is unreliable. Likewise, getNetworkType() will return 0 for a phone in airplane mode. In fact, airplane mode will cause getLine1Number() and the getSim* methods to return null too. But even in airplane mode, the IMEI of a phone persists.