| | |
| ----------- | --- |
| Version | 0.21.2 |
| Affected OS | Android |
| OS Version | 8.0.0 |
IsTablet is returning false for Google Pixel C (emulator), don't have actual device to test out.
IsTablet should return true.
Hi @Ken-Lim and thank you for reporting this. How would you define a tablet?
The problem is: there's actually no accurate way on Android to guess if a device is a Phone or a Tablet. See also https://github.com/rebeccahughes/react-native-device-info/issues/198#issuecomment-362791408
The only accurate way I can think of if to manually handle a list of tablets, but that would be unrealistic regarding the vast number of vendors worldwide.
Feel free to send a PR if you find a better implementation.
This page seems helpful, defining the aspect ratios and height/width in px and dp, covering most of the device categories out there - https://material.io/tools/devices/
The first column "Type" specifies whether the device is considered a tablet or not.
@fxdemolisher is this fixed by #560 ?
@machour should be handled by screen size detection that was in #560. We tested the logic internally on a bunch of tablets and chromebooks but the pixel C was not one of them (Sadly). I can vouch for it working on a pixelbook and a pixel slate though.
I guess it's fair enough to assume this is fixed, thank you for getting back to me.
@Ken-Lim please re-open if you still see the problem with 0.26.1