Is there any way to detect that the app is running on Tablet
or on Smartphone
?
Until now I do it by detecting the width of pixeles
, but I find the Samsung Galaxy S3, S4 range... that have more resolution than a tablet and it is not optimal.
Is there any way to detect that the app is running on Tablet
or on Smartphone
?
Until now I do it by detecting the width of pixeles
, but I find the Samsung Galaxy S3, S4 range... that have more resolution than a tablet and it is not optimal.
Forget about detecting pixel width or density, this method is the one I use and it's the one suggested by google:
Additional info: http://developer.android.com/reference/android/content/res/Configuration.html#screenLayout