06-19-2013 09:30 AM
There's an API for HTML5 WebWorks, but I can't find an API for Cascades or Native. Also, the associated link of the force method links to this page, which doesn't mention a force element. Seeing as the screen is heat/elec sensitive, and not pressure sensitive, I doubt it's possible.
06-19-2013 02:51 PM - edited 06-19-2013 02:53 PM
If you press down harder, the patch of your finger making contact with the screen gets bigger.Some devices measure and intepret the size of this touch area as "pressure". The problem is that the angle of your finger usually changes as you slide it across the screen, changing the shape and area of the touch too.
The native SDK has a structure called mtouch_event which contains the width & height of the touch. You might be able to approximate the area from that, assuming a fixed circular touch shape. It also contains a pressure member, but the docs state it is not implemented. Not sure if there's something similar in Cascades, or whether you can access the raw native mtouch_event data.
06-19-2013 03:17 PM
Innovatology said: The native SDK has a structure called mtouch_event which contains the width & height of the touch. You might be able to approximate the area from that, assuming a fixed circular touch shape.
I've looked into mtouch_event, and although you could theoretically get pressure, as you've said, finger angle and position can alter the result. In fact, finger angle and which part of the finger touches the screen are much greater factors to touch size then pressure.
It is possible to use it in a Cascades app, nevertheless, by importing event_types.h and a few other classes. Can't see it as being very accurate though.