Problems with capability detection (sys.capabilities)


#1

I’m having some issues with capability detection (using “SysTest.js”), like it returning “true” for “accelerometer” on a desktop PC and not detecting “touches” on an Android emulator (althought it does detect “touches” -and “keyboard”- in android stock browser on a real phone).

PS: does anyone know if it’s possible to distinguish between single-touch and multi-touch capable devices?

PS2: on a related note, “LocalStorage Test” is outputting “1 2 Hello World 3 4 null” in the console, is that the expected behaviour?


#2

Hi Sebastián,

"it returning “true” for “accelerometer” on a desktop PC"
The testing condition of this item is “window.DeviceMotionEvent || window.DeviceOrientationEvent” and some laptops have an accelerometer, for example: IBM ThinkingPad.

"does anyone know if it’s possible to distinguish between single-touch and multi-touch capable devices?"
Is it important to distinguish between single-touch and multi-touch capable devices?
Why should we need to know what type of the devices?

"on a related note, “LocalStorage Test” is outputting “1 2 Hello World 3 4 null” in the console, is that the expected behaviour?"
No, that is the right behaviour.

Best regards
David


#3

Dingping Lv wrote:

The testing condition of this item is “window.DeviceMotionEvent || window.DeviceOrientationEvent” and some laptops have an accelerometer, for example: IBM ThinkingPad.

I’ve checked my PC and it doesn’t appear to have such sensors on any hardware, that’s why I think it’s strange (it’s not a laptop, it’s a desktop computer).

Is it important to distinguish between single-touch and multi-touch capable devices?
Why should we need to know what type of the devices?

Well, I think it could be useful, since I can’t tell the player that the way for zooming in and out is to use the standard two-finger gesture if it’s device doesn’t support it, I would have to show zoom in and out icons instead. But it’s not a crucial feature I guess (I could always just ask the player if the device supports it or not if I really needed to know I guess).

"on a related note, “LocalStorage Test” is outputting “1 2 Hello World 3 4 null” in the console, is that the expected behaviour?"
No, that is the right behaviour.

OK, I’ll re-read that test, I guess I’m misinterpreting something there…

Thanks!


#4

I don’t know how to distinguish between single-touch and multi-touch capable devices.

I think we can add a flag “isSingleTouchDevice” to TouchDispatcher, if the touches’ length greater than 1, set this flag to false. :stuck_out_tongue:

I don’t think this is a good solution.


#5

No, that would indeed not be a good solution. Plus in most scenarios multitouch devices are used with only one finger anyway.