Closed webserveis closed 8 years ago
Hi, I usage this code for detect if tablet
public static boolean isTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
@webserveis Please check the referenced commit as the solution.
The one you have provided does not work all the time and has issues. I have checked the above and as per my testing with devices it fails on different devices by different manufacturers.
The provided solution is not merged into master
as I am still testing it , but its is a better solution as it is based of the screen size metric.
code is merged into master
and fixed for release 1.2.0
, please reopen if having issues still.
If posible detected the app is running in Smartphone or Tablet , Tv