Guest User

Untitled

a guest
Jul 24th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. public boolean isTablet(Context context) {
  2.   TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
  3.   if (manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) {
  4.     //Tablet
  5.     return true;
  6.   }
  7.   else {
  8.     //Mobile
  9.     return false
  10.   }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment