Platform service doesn't return 'tablet' consistently

I’m running a Google Pixel C tablet and using the Ionic platform service to get the array of platforms. When the device is in landscape mode, it will return
’mobile, android, tablet, mobileweb’

but in portrait mode it only returns
’mobile, android, mobileweb’no tablet.

One caveat, my ionic app is currently hosted at another location and I’m accessing it directly via the Chrome browser (as evidenced by the mobileweb flag), so maybe this has something to do with it, but I would have thought that the orientation would not change the platforms values.

There are probably some (pixel) checks in there that fail for the Pixel in “portrait”.

Code for the platform stuff is generally here: https://github.com/ionic-team/ionic/blob/master/src/platform/platform.ts
This might be a big, so report it at https://github.com/ionic-team/ionic/issues please.

Late response but it does appear to already have been reported as a bug, here: https://github.com/ionic-team/ionic/issues/9724
Thanks.

1 Like