Help Test Platform Detection

Hey guys, I discovered some APIs that behave differently on Apple and Android and I figured I could use that for a platform detection module for analytics (which I’ll open source of course).

I don’t really have many devices to test with, so I’d love it if you guys could just hop on here with whatever you’ve got and let me know if it ever gave incorrect platform data. Touchscreen laptops, all-in-one desktop thingies, Xbox, tablets, phones, try whatever you have please.

Thanks!

11 Likes

Apple I-Pad (Air 2) —> Unknown Mobile


Apple I-Pad after update —> Apple Mobile (1.00)
Touchscreen Laptop With Mouse → PC
Touchscreen Laptop Without Mouse → PC (Maybe because I have my touchpad)
PC (The computer with a monitor and that box thingy) with mouse and keyboard → PC
PC (The computer with a monitor and that box thingy) with no mouse and with keyboard → PC
PC (The computer with a monitor and that box thingy) with mouse and no keyboard → PC
PC (The computer with a monitor and that box thingy) with no mouse and no keyboard → PC


Touchscreen Laptop After Update → Still PC

I don’t know if with the keyboard and mouse plugged in will make a difference but I just tried it.

1 Like

Am on android mobile, place got it right.

Made a change to Apple detection, please try again!

1 Like

I’m Android, Samsung Galaxy A70, but it said Apple Mobile.

Fixing now, turns out gravity returns 0 at first and I need to wait for that data to load in before doing a platform check.

worked fine for me, laptop → pc.
seems to only have issues with platform detection on mobile?

On my surface go, it said PC, which is pretty accurate.

I switched to tablet mode though it still said PC, but I think this is just the surface’s operating system.

(BTW this is a all in one pc thingy)

Pushed a fix for Apple/Android detection. It relies on the gravity value and I needed to wait for that to load in before checking.

I’ll begin working on detecting the dif between phone/tablet

Says Android Mobile now which is correct, this is very good!

It got my device correct but the version wasn’t right when I tried it on a Samsung S7. Which runs Android 7.00 while the game said 6.30

Oh that number had nothing to do with OS version, that was me debugging the gravity value because I had to figure out why it was 0

1 Like

Updated to not only tell Apple/Android, but also Phone/Tablet. Thanks to @Repotted for showing me this trick!

1 Like

Could you retest those devices? I think I fixed touchscreen laptop detection.

Edit: It doesn’t make sense that it would call your touchscreen laptop a PC because none of the paths inside my UIS.TouchEnabled have that as a result… is your touchscreen disabled or something?

Worked fine for me on PC. My laptop is touchscreen as well.

I also tried on on android (Samsung Note 10) and it said Android Phone.

All was fine with mine! :+1:

1 Like

Works fine for me. I have a touchscreen laptop and it said PC.

Oops, sorry for the late reply. Here’s a video:


You can clearly see my finger tapping nonstop.

That’s so strange. I don’t know how else to detect that if UIS.TouchEnabled isn’t registering it…

Hey boatbomber,
It worked! It correctly identified my PC computer.

It’s very interesting how you can do platform detection, I would never know how…

Can confirm it works great on Pixel 4 XL, picked up Android. Broke it by turning off my phone’s sensors, but somehow don’t see this being an issue lol

It did, however, pick up my HP Chromebook as a touchscreen PC, which in this instance, it is not.

2 Likes