[android-developers] Re: How to detect tablet devices

2012-10-25 Thread bob
It's either humor or tumor. On Thursday, October 25, 2012 2:50:59 PM UTC-5, Lew wrote: > > djhacktor wrote: > >> public static boolean isTablet(Context paramContext) >> { >> if >> (((TelephonyManager)paramContext.getSystemService("phone")).getPhoneType() >> == 0); >> for (boolean bo

[android-developers] Re: How to detect tablet devices

2012-10-25 Thread Lew
djhacktor wrote: > public static boolean isTablet(Context paramContext) > { > if > (((TelephonyManager)paramContext.getSystemService("phone")).getPhoneType() > == 0); > for (boolean bool = true; ; bool = false) > return bool; > } > WTF? This is humor, right? -- Lew -- Y

[android-developers] Re: How to detect tablet devices

2012-10-25 Thread djhacktor
public static boolean isTablet(Context paramContext) { if (((TelephonyManager)paramContext.getSystemService("phone")).getPhoneType() == 0); for (boolean bool = true; ; bool = false) return bool; } On Thursday, 25 October 2012 01:01:21 UTC+5:30, Aaron wrote: > > I know this is a

[android-developers] Re: How to detect tablet devices

2012-10-24 Thread Aaron
I know this is an old thread but in case someone stumbles across this in the future the best way (for me at least) to solve this was to get the metrics of the screen size (width and height in pixels) calculate the hypotenuse then divide by the dpi. In theory this gives you the dimension in inc

[android-developers] Re: How to detect tablet devices

2011-03-28 Thread ole!
This thread has focused on the tablet screen as a distinguisher. Another real problem is that tablets from a specific carrier (such as the T-Mobile Galaxy), cannot make a phone call. I have found no way to distinguish this characteristic of tablets. What I have tried: 1. catching an exception from

Re: [android-developers] Re: How to detect tablet devices

2011-02-25 Thread Mark Murphy
On Wed, Feb 23, 2011 at 12:47 PM, Carlo Codega wrote: > Is there any numeric size about XLARGE screens? AFAIK there could be > smartphone devices with "xlarge" screens, or not? I don't see any > documentation which says that XLARGE screens are > 6 inches > > Does xlarge refer to the phisical size?

Re: [android-developers] Re: How to detect tablet devices

2011-02-24 Thread Carlo Codega
Is there any numeric size about XLARGE screens? AFAIK there could be smartphone devices with "xlarge" screens, or not? I don't see any documentation which says that XLARGE screens are > 6 inches Does xlarge refer to the phisical size? or resolution? Carlo On Wed, Feb 23, 2011 at 6:27 PM, Dianne

Re: [android-developers] Re: How to detect tablet devices

2011-02-23 Thread Scott Davies
Dianne, I'm confused. If your response had six "no's", I'd know not to do this for sureŠbut with just five ? This appears to be a grey issueŠ :) - Scott From: Dianne Hackborn Reply-To: Date: Wed, 23 Feb 2011 09:27:13 -0800 To: Cc: carlo Subject: Re: [andro

Re: [android-developers] Re: How to detect tablet devices

2011-02-23 Thread Dianne Hackborn
No no no no no. getResources().getConfiguration() tells you this kind of stuff about the device. Look for LARGE or XLARGE screen size, depending on what you want to do. And of course you can have your resources adjust automatically by using things like layout-xlarge. On Mon, Feb 21, 2011 at 6:0

Re: [android-developers] Re: How to detect tablet devices

2011-02-23 Thread TreKing
On Mon, Feb 21, 2011 at 8:09 AM, carlo wrote: > Any comments/suggestions? Read Dianne's post. - TreKing - Chicago transit tracking app for Androi

[android-developers] Re: How to detect tablet devices

2011-02-22 Thread carlo
Thank you all Here is the code I use for my app: public boolean isTablet() { try { // Compute screen size DisplayMetrics dm = context.getResources().getDisplayMetrics(); float screenWidth = dm.widthPixels / dm.xdpi; float screenHeight = dm.heightPixels / dm.yd

Re: [android-developers] Re: How to detect tablet devices

2011-02-18 Thread rich friedel
that was posted days ago but sat in moderation and shortly thereafter I found out I was incorrect but couldn't take it back... whoops! On Feb 18, 2011 2:49 PM, "SteveHM" wrote: > Wrong. My legit. european version of the Galaxy Tab has full > telephony/GPRS alongside WiFi etc. > > On Feb 16, 9:01 p

[android-developers] Re: How to detect tablet devices

2011-02-18 Thread SteveHM
Wrong. My legit. european version of the Galaxy Tab has full telephony/GPRS alongside WiFi etc. On Feb 16, 9:01 pm, rich friedel wrote: > telephony... however at the pace things are moving that might be an obsolete > test soon -- You received this message because you are subscribed to the Goo

Re: [android-developers] Re: How to detect tablet devices

2011-02-16 Thread Dianne Hackborn
In fact, you really shouldn't think "target a tablet." What does "tablet" mean? You will quickly find that this is an incredibly nebulous term. Target screen size: adjust your UI for xlarge (or large). Target other specific hardware aspects that make sense for you (does it have a hardware keybo

[android-developers] Re: How to detect tablet devices

2011-02-16 Thread String
As a first approximation, if the device vendor has chosen to go with large (or xlarge) screen size, then it's a tablet. I know, other devices (like netbooks and Google TV) will also get picked up by this, but that's why I called it a first approximation. To detect this in code, take a look at t