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
Post a Comment