hi ,
how can we detect, that with how much pressure the screen is pressed or tapped.
i.e when we click or tap the touche screen, at that time can we find out, with how much pressure or force user has clicked or taped the touch screen.
can we calculate touch pressure
(9 posts) (6 voices)-
Posted 6 months ago #
-
No you cant :P, but you can find out how much the device moved and make decisions based on that.
Posted 6 months ago # -
hi Yves,
thank's for your replybut in my view we cant find the pressure based on device moved.
because one persons hold devices stronger or with more energy ,some other person holds
in easy or with very less energy and some other with medium energy.even though the users used the same pressure to tap the touchscreen but the devices move will change depending
upon the strength that the user holdif person hold strongly then device wont move much
if person hold easily then device will move more distance
so here device movement is completely depend upon energy used to hold the device in my view
in my view ,with this method we cant find, with how much pressure the user pressed the screen.
if my view is wrong please let me know.
is there any other solution
Posted 6 months ago # -
I do this for my jump:
The user first touch the screen, we set a FLAG, isTouching = YES... after the touch ended even fires, we set the flag again to isTounching = NO.
Then on our update method, we check to see if the flag isTounching is TRUE, if it is, then we continue to apply force to our jump. In your case, if you just want information on how much time the user has touched, you could just increase a float number while the isTouching is still true, after then touch end, you have an info on how much time the user has pressed the screen (thus, the pressure time). I do not think there is a way to see how much strength the user has put in, but i could be wrong though.
Hope it helps a bit! Cheers! :)
Posted 6 months ago # -
Apple does not expose the pressure sense APIs to us devs. There are private methods that allow you what you want to do:
http://tenonedesign.com/blog/pressure-sensitive-drawing-on-ipad/
However if you use these API calls Apple will probably reject your app.
A different approach that I've seen some devs do is use the accelerometer to measure how hard the touch was. If someone lightly touches the screen the accelerometer has other values than if someone hits the screen. It's not quite pressure, but Apple wouldn't reject you, and depending on what you want to do (piano keys that are louder if you hit the screen harder) may be enough.
Posted 6 months ago # -
Yeah thats what garage band does. And its what i suggested. Im not saying its a great solution, but it does work to some extent. What your saying is true, but the user will usually adapt to how he/she is supposed to use the app. Maybe, in the options or help tab you could illustrate how the method works?
Posted 6 months ago # -
Those screens doesn't react to pressure at all but to capacitance. But there are private API calls that can give you the info about the touch area which you can use then to simulate pressure, i.e. when your finger presses harder, the touch area would be bigger. That's exactly what they use in hactar's sample to differentiate stylus and palm. But I am sure Apple would reject this...
Posted 6 months ago # -
Hi friends,
Thank you for all your solutions and suggestionsi will try to find the best solution for my requirement based on your suggestions
if there are any other solutions please let me know
thank you
Posted 6 months ago #
Reply
You must log in to post.