How to judge whether the Android device is phone or pad? -


how judge whether android device phone or pad,i can not find method of android api.now judge based on device dimensions, if(size > 6) -->pad else ---> phone,does have solution

i know not want hear, don't distinguish between phone or tablet.

you need ask yourself, why?
- there 7inch + devices phone functionality.
- there 5inch - devices without phone functionality.
- sensors vary between devices, large , small.
- there phablets may fall either category.

so, if definition of "phone" is, "can make phone calls?" ...

telephonymanager manager =          (telephonymanager)context.getsystemservice(context.telephony_service); if(manager.getphonetype() == telephonymanager.phone_type_none) { // has no phone  } 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -