small medium large xlarge

20 Oct 2012, 00:56
Armin Gerst (2 posts)

I just started reading the book an and tried to run the examples from chapter 2.4 “Use Touch Screen Pressure to Control Color Hues”. It looks like as if motionPressure is not giving changing values on all Android devices. On my cheap Lenovo A1 Ideapad (Android 2.3.4) the value is allways 0.375. Therefor no color changing ellipses, only red ones. The same script run on a Huwawei Honour (Android 4.0.3) works as expected.

I think a hint in the book would be helpful.

Best regards Armin

25 Oct 2012, 21:58
Wayne Stidolph (2 posts)

I get 0 until the first touch, then always 1 (on the Verizon Galaxy S III running CyanogenMod CM10/Jelly Bean nightly as of 24 Oct)

08 Nov 2012, 17:40
Daniel Sauter (52 posts)

Hi Armin and Wayne,

thanks for your feedback. motionPressure is a Processing constant, so we are depending on Processing here and device manufacturers to report those values in a way we can use to work with them. From your feedback, it looks to me a couple of checks are necessary to determine the range of reported values for the client device, and map the response accordingly. Fragmentation seems to be an issue here.

Best, Daniel

You must be logged in to comment