We have a an angular Ionic app that renders differently for Mobile and Desktop. We are experiencing issues with users on Microsoft Surface and Surface Pro rendering the Mobile version of the site from any browser they are using on their laptop. The Platform is outputting either Mobile MobileWeb or Tablet Mobile MobileWeb.
You may want to change the title, sounds like a troll post.
Good question- I took liberty to rephrase the title assuming it attracks more eyes this way. Please apologize if I am wrong.
You can use Capacitor Device Plugin or use css media queries to stylish the app based on screen size.
thats not the issue… the issue is that Ionics Platform Service is reporting a Surface and Surface Pro when operating in any web browser as a Mobile Tablet. I am asking why that is being reported as a Mobile device when its a laptop?
If you want to know why, I suggest you to look into the source code of the platfrom service on github.
If you want to change the behaviour of the service, log an issue on the github repo, or even do a PR
If you want to detect properly and override its behaviour in your app, rephrase your question or use google figure out how to detect Surface and implement in your code
Which option will help you best?
I misunderstood your question. I see you changed it now so it’s more clear. Anyway, you can still use
Device.getInfo() to check the model, OS, platform, etc. and do some workaround for now and report the bug.