7

I understand that by default (pre ICS), to distinguish between a Tablet & Smartphone, a developer can use the sdk version in the Android Manifest (apart from screen size and openGL filters). Now with ICS running on both SP and Tablet, what options does a developer have in case I need to distinguish between SP and Tablet?

I don't think screen size is reliable.

Lets say for certain reasons I cannot have a common apk for SP and Tablet. I would also like to avoid a separate application for Tablets and SP

skynet
  • 9,898
  • 5
  • 43
  • 52
AAP
  • 1,246
  • 12
  • 21

2 Answers2

9

The only significant differences between tablets and phones are, in general, screen size and the presence of telephony capabilities, plus the fact that phones will generally have mobile data while tablets may be wifi-only. With ICS, the software running on the two classes of device is basically the same, so the only interesting distinguishing features are these points. If a device has a screen big enough for your app and provides all the required capabilities, does it matter if it's a phone or a tablet?

I'd say that screen size is exactly what you should be filtering on. It's not 'phone version' and 'tablet version' so much as 'little screen' and 'big screen'.

Matthew Walton
  • 9,809
  • 3
  • 27
  • 36
  • 2
    Thanks, although this does not completely answer the original question, but I like your statement, "It's not 'phone version' and 'tablet version' so much as 'little screen' and 'big screen'." – AAP Dec 07 '11 at 10:20
  • +1 I also think that the only thing that truly differentiates a tablet and a phone is the screen size. – Zsombor Erdődy-Nagy Dec 07 '11 at 10:20
  • 6
    **So what is a 'little' and what is 'big'?** You can't compare pixels, because a new phone may have a lot more pixels than a tablet, like the galaxy nexus compared to asus transformer. Also, an old phone can have less pixels than a new tablet. – AlikElzin-kilaka Apr 01 '12 at 09:02
0

You can also check build.prop

Tablets running ICS should have this set to tablet, phones would be phone/default

ro.build.characteristics=

cdesai
  • 21
  • 1