getPressure always return 1.0 on Galaxy S4 - Galaxy S 4 Developer Discussion [Developers-Only]

The MotionEvent method getPressure() always return 1.0f on Galaxy S4. However, it can return a 0-1.0 value by getSize().
Should I modify the screentouch driver file to make getPressure() return a proper value? It seems S4 uses Synaptics touchscreen controller.
Any suggestions are appreciated. Thank you.

Do you believe this is actually possible? There is a lot of stuff that's s-pen targetted that might work well. Do you know if it returns variable values on note/2?

hubrix said:
Do you believe this is actually possible? There is a lot of stuff that's s-pen targetted that might work well. Do you know if it returns variable values on note/2?
Click to expand...
Click to collapse
Sorry I don't quite understand what is "actually possible". I tested getPressure() on S4, Galaxy Nexus and Nexus 4, only S4 always return 1. I don't have a Note 2 to test

coolriver said:
Sorry I don't quite understand what is "actually possible". I tested getPressure() on S4, Galaxy Nexus and Nexus 4, only S4 always return 1. I don't have a Note 2 to test
Click to expand...
Click to collapse
whats wrong with using getSize()? I never knew the new touch screens handled pressure. That was an older style touch screen that could do that. I would just use getSize()

elesbb said:
whats wrong with using getSize()? I never knew the new touch screens handled pressure. That was an older style touch screen that could do that. I would just use getSize()
Click to expand...
Click to collapse
Thank you for the reply.
In my understanding, getPressure resturns the approximate "pressure" (by software sensor) on the screen surface, while getSize returns some approximation of the "area" of the screen being pressed. I think pressure and area are correlated, but according to my experiment on Galaxy Nexus, the returned value of getPressure and getSize are not linearly dependent. So getSize can't replace getPressure, am I right?
BTW, I am doing a research on Android devices which requires to get the pressure value on the screen. Can someone tell me how the pressure value is caculated (maybe by other sensor value)? I searched but can't find conresponding documents.
Thanks again.

coolriver said:
Thank you for the reply.
In my understanding, getPressure resturns the approximate "pressure" (by software sensor) on the screen surface, while getSize returns some approximation of the "area" of the screen being pressed. I think pressure and area are correlated, but according to my experiment on Galaxy Nexus, the returned value of getPressure and getSize are not linearly dependent. So getSize can't replace getPressure, am I right?
BTW, I am doing a research on Android devices which requires to get the pressure value on the screen. Can someone tell me how the pressure value is caculated (maybe by other sensor value)? I searched but can't find conresponding documents.
Thanks again.
Click to expand...
Click to collapse
Last time i checked on how getPressure() was calculated was determined by how much of your finger was actually touching the screen. I know things like mousepads like on laptops, they have a totally different pressure plate in them, i think its derived off the same technology as an electronic balance. So maybe some devices like your Galaxy Nexus have this sensor in them, i don't have a nexus, but all my devices HTC HD2, Galaxy S2, S3, S4 all have the same value for getPressure().
If i were you, i would go into the source code and look at the method getPressure() and see how exactly it is being calculated.

elesbb said:
Last time i checked on how getPressure() was calculated was determined by how much of your finger was actually touching the screen. I know things like mousepads like on laptops, they have a totally different pressure plate in them, i think its derived off the same technology as an electronic balance. So maybe some devices like your Galaxy Nexus have this sensor in them, i don't have a nexus, but all my devices HTC HD2, Galaxy S2, S3, S4 all have the same value for getPressure().
If i were you, i would go into the source code and look at the method getPressure() and see how exactly it is being calculated.
Click to expand...
Click to collapse
So HD2, S2/3/4 all return a fixed value for getPressure()? That's interesting
Yes, maybe I should look into the source code. Thanks again.

coolriver said:
So HD2, S2/3/4 all return a fixed value for getPressure()? That's interesting
Yes, maybe I should look into the source code. Thanks again.
Click to expand...
Click to collapse
yes they all did return a fixed value for pressure. And the source code can help A LOT

elesbb said:
yes they all did return a fixed value for pressure. And the source code can help A LOT
Click to expand...
Click to collapse
Thanks a lot.
Could you give me some suggestions about where I should start to find the related code with getPressure?
I am new to Android (kernel) source code. After I downloaded the kernel source code for S4, and checked the driver code (under "GT_I9505G_JB_Opensource_Update1/Kernel/drivers/input/touchscreen/synaptics", because it's said S4 uses Synaptics touch screen controller), I haven't found where the pressure is calculated. Maybe I checked in the wrong location? Any suggestions are appreciated. Thanks again!

Related

Decrease mogul screem pressure threshold?

I wanted to do this so that I wouldn't have to press down as hard on the screen, mainly for using S2U2, but this registry key does not seem to exist. I searched the registry for 'threshold' and could not find the screen setting:
http://www.pocketpctweaks.com/pocketpc_tweaks/Minimize_tapping_Pressure
Is this possible on the mogul? Thanks.
JKingDev said:
I wanted to do this so that I wouldn't have to press down as hard on the screen, mainly for using S2U2, but this registry key does not seem to exist. I searched the registry for 'threshold' and could not find the screen setting:
http://www.pocketpctweaks.com/pocketpc_tweaks/Minimize_tapping_Pressure
Is this possible on the mogul? Thanks.
Click to expand...
Click to collapse
No. not possible duue to hardware limitations. Pressing is required because of the type of touch overlay used.
This isn't a capacitive touch iphone! thank god!
When you align your screen if you use the softest touches to align it with it will make it where you dont have to touch so hard. I know it sounds crazy but I run into this issue once and realised that I was hitting the screen too hard during the calibration.
gazorp said:
No. not possible duue to hardware limitations. Pressing is required because of the type of touch overlay used.
This isn't a capacitive touch iphone! thank god!
Click to expand...
Click to collapse
You don't like the iphone touchscreen? Why not? I wish windows mobile devices has screens like that. I do know that pressing is necessary, but how hard you must push is a setting.
Thanks for the tip about the calibration. I will try that.
JKingDev said:
You don't like the iphone touchscreen? Why not? I wish windows mobile devices has screens like that. I do know that pressing is necessary, but how hard you must push is a setting.
Thanks for the tip about the calibration. I will try that.
Click to expand...
Click to collapse
It's capacitive meaning you must use your finger. I like being able to use a stylus, pen cap, finger, gloved finger, finger nail, etc, etc, etc.
lllboredlll said:
When you align your screen if you use the softest touches to align it with it will make it where you dont have to touch so hard. I know it sounds crazy but I run into this issue once and realised that I was hitting the screen too hard during the calibration.
Click to expand...
Click to collapse
I don't think this is likely. If this were true, someone could write an app to capture the touch pressure and change, say, the width of the brushstroke in a painting application (like a Wacom drawing tablet). I'm pretty sure that touch pressure for these screens is limited to ON and OFF, not variable levels.
getwilde said:
I don't think this is likely. If this were true, someone could write an app to capture the touch pressure and change, say, the width of the brushstroke in a painting application (like a Wacom drawing tablet). I'm pretty sure that touch pressure for these screens is limited to ON and OFF, not variable levels.
Click to expand...
Click to collapse
You may be right, but I am still trying his method. What is there to lose.
J Shed said:
It's capacitive meaning you must use your finger. I like being able to use a stylus, pen cap, finger, gloved finger, finger nail, etc, etc, etc.
Click to expand...
Click to collapse
Here Here!! I hate the iphone screen. no tactile feedback either. I'll take i t a step further and admit I hate the iphone!
getwilde said:
I don't think this is likely. If this were true, someone could write an app to capture the touch pressure and change, say, the width of the brushstroke in a painting application (like a Wacom drawing tablet). I'm pretty sure that touch pressure for these screens is limited to ON and OFF, not variable levels.
Click to expand...
Click to collapse
QFT!!!
serfboreds said:
You may be right, but I am still trying his method. What is there to lose.
Click to expand...
Click to collapse
Your dignity.
This is not going to change anything, it's a placebo effect if anything. Just like the quickgps application soo many idiots are running.
Shadowmite said:
This is not going to change anything, it's a placebo effect if anything. Just like the quickgps application soo many idiots are running.
Click to expand...
Click to collapse
Can you elaborate on this thought please? I am one of those 'idiots' who thought the application was helping.
I like being an idiot with no dignity.....ty for pointing this out
lllboredlll said:
I like being an idiot with no dignity.....ty for pointing this out
Click to expand...
Click to collapse
Hey, at least your sense of humor is intact!
Thanks for making me laugh lllboredlll.
yeah the quickgps is deffinetly a placebo. I've thoroughly tested using and not using this on 4 different titan's with mixed/random results, and conclude, that it does absolutely nothing.
QuickGPS to clarify (this is now off topic of the thread) saves empheris data from the internet to a file that on the original phones would be checked and the data loaded properly to use. On the titan however the file is stored, and is never checked again. Many of the people responsible for giving titan users modded phones have stated this fact. Yet n00b's, no offense, continue to preach that it works and others follow along.
Shadowmite said:
QuickGPS to clarify (this is now off topic of the thread) saves empheris data from the internet to a file that on the original phones would be checked and the data loaded properly to use. On the titan however the file is stored, and is never checked again. Many of the people responsible for giving titan users modded phones have stated this fact. Yet n00b's, no offense, continue to preach that it works and others follow along.
Click to expand...
Click to collapse
Good enough for me. I will not be using it from this point forward. Thanks.
just to keep the spunk alive in this thread,,,,
as for the screen pressure.. I was pretty sure that they are xon xoff too... and that pressure sensitivity has no premise in these phones... until..........
and I may be speaking out of my arsehole,, I had loaded up a couple big apps that sucked up a bunch of memory, and at first i thought my screen had quit responding, because when i would click it with the stylus nothing would happen,, but I pressed real hard one time and it worked,, I went back to normal pressure and it didnt work,, i tried with normal pressure 5 times and no go.. then the 6th time i pressed hard and pow it took it,,, i continued doing this just to test it out,, and it did the same thing over and over again until I decided to soft reset.. then all was back to normal...
so maybe I had so much buffering or something going on with the other tsr programs running, that it caused a glitch in the pressure threshold of the screen...
just a thought,,,
Shadowmite said:
Your dignity.
This is not going to change anything, it's a placebo effect if anything. Just like the quickgps application soo many idiots are running.
Click to expand...
Click to collapse
LOL, you are great. I am going to read through all of your posts for insight and humor. Keep up the good work my friend!

Touchscreen problem: move threshold

Hi, I made a video of the problem here:
http://www.youtube.com/watch?v=sRXcBcpSD1w
It's minor, but I'd still like it fixed.
I heard about this as well... does look annoying. What application did you use to test that?
Timmmmmm said:
Hi, I made a video of the problem here:
http://www.youtube.com/watch?v=sRXcBcpSD1w
It's minor, but I'd still like it fixed.
Click to expand...
Click to collapse
I think "Yet Another Multitouch Tester" or something. There are loads of them in the market.
Yea I was just curious. I use multitouch visible test which shows coordinates as well and I tried to replicate this on my Nexus S... doesn't have that threshold though, it's similar to the Nexus One. Wonder why samsung would add that...
BTW could you tell me how many simultaneous touch inputs the screen can register? The original SGS and Nexus S can register 5 according to multitouch visible test. Nexus One as you know can do 2 but when you cross each axis they flip.
Timmmmmm said:
I think "Yet Another Multitouch Tester" or something. There are loads of them in the market.
Click to expand...
Click to collapse
I got up to 10 and then ran out of fingers...
There's no axis flipping problem.
Ok so the physical touchscreen technology is very good... it's just samsung has written in this threshold movement delay, that's a bummer lol.
Timmmmmm said:
I got up to 10 and then ran out of fingers...
There's no axis flipping problem.
Click to expand...
Click to collapse
I think the touchscreen is so extremely sensitive they decided to fool-proof the phone.
without this "sticking" there would be no way for an average person with shaky fingers to register a TAP not a micro-SWIPE.
kreoXDA said:
I think the touchscreen is so extremely sensitive they decided to fool-proof the phone.
without this "sticking" there would be no way for an average person with shaky fingers to register a TAP not a micro-SWIPE.
Click to expand...
Click to collapse
I doubt it. It's virtually impossible to perfectly tap on other phones and it's not a problem. I'm pretty sure 'micro-swipes' are detected by the software layer as taps.
Well does it affect the phone usage otherwise?
I just checked on 3Gs (havent got the S2 yet, damn these late release dates ) and sure enough it has the exact same delay and skip when I slowly try to scroll say web pages. Its always been good enough for me though.
I would be more interested in an accuracy test to see if there are any major issues with the hardware itself. Last test I saw showed everyone but the iPhone digitizer having abysmal performance, I remember the Droid loosing the finger signal all the time.
Any links to the touchscreen performance test you mention?
As for the "deadzone" for touch input, CyanogenMod7 for the SGS has this aswell. Furthermore, it also has a "feature" where if you move your finger slower than a certain speed across the screen, homescreens/browser pages etc will just ignore the touch input. So if you want to minimally correct the framing of a webpage, if maybe the text is just cut off on the side, you need to quickly swipe a very short swipe to get any movement on the screen. Trying to slowly change framing is not possible.
Hardware is fine though, multitouch tests has no filtering like deadzones or speed thresholds.
I have this problem to, Its definitely software I think.
I wonder if its easy to mod to get rid of this deadzone/minimum threshold for scrolling. Anyone able to take a look. Its quite annoying in some things and my old android phone didnt do this.
Angry birds doesn't bypass the problem. It's quite hard to see underneath your finger but the problem is definitely there in "Angry Birds Rio".
Scrolling in some views don't show the problem so badly, presumably because they use the relative movement of each move event, rather than the absolute distance from the down event.
Yeah problem is still there in angry birds my mistake.
Its quite annoying in nova hd when you want to move the crosshair a tiny amount. You can't because of this problem
Anyone know what file in the source could be edited to maybe stop this ?
sorrowuk said:
Yeah problem is still there in angry birds my mistake.
Its quite annoying in nova hd when you want to move the crosshair a tiny amount. You can't because of this problem
Anyone know what file in the source could be edited to maybe stop this ?
Click to expand...
Click to collapse
my hunch is this source is not available, and somewhere in samsung's closed framework or similar.
i know on cyanogen rom, you can go look at the source code for ADW launcher, and you can locate the touch input source code. and you can find all the algorithms like dX, dY, that are used to register swipes, motion, scrolls, etc. its all pretty complicated and impressive code actually.
i'm sure samsung has equivalent code somewhere.
So if we got rid of touchwiz and used ADW launcher would the problem still be there?
sorrowuk said:
So if we got rid of touchwiz and used ADW launcher would the problem still be there?
Click to expand...
Click to collapse
Good question. I'm curious.
Still same problem with adw launcher
This looks more like a kernel thing to me in the touchscreen driver...
Are we able to edit/mod/patch the touchscreen driver in the kernel or is this only something samsung can do ?
sorrowuk said:
Are we able to edit/mod/patch the touchscreen driver in the kernel or is this only something samsung can do ?
Click to expand...
Click to collapse
We have the sources. I'm checking out the frameworks first though in case it's obvious.

Swapping screens with International GN

I bought an international unit as well as the At&t version on contract. Does anyone know if I can swap the screens? I prefer the speed of the international version but the buttons on the US version.
I will be getting a plastic pry tomorrow and going ahead with the procedure. Would people be interested in seeing if it works? I'll include pictures.
fuzzled said:
I bought an international unit as well as the At&t version on contract. Does anyone know if I can swap the screens? I prefer the speed of the international version but the buttons on the US version.
I will be getting a plastic pry tomorrow and going ahead with the procedure. Would people be interested in seeing if it works? I'll include pictures.
Click to expand...
Click to collapse
What makes u think the screens are different?
Posting pics of the procedure would be very cool, but it isn't likely to work totally smoothly. The I777 and I9100 (AT&T and international GS2 variants) are nearly identical in hardware but devs needed to do some rewiring to make the buttons work from I9100 ROMs on I777. You might want to check out Entropy's hellraiser thread; he can probably give you further advice on how to fix up the key mappings. I'm pretty sure it involves modifications to the kernel though, so be careful.
I'd rather go the other way. I want to put the screen/buttons from my international note into my AT&T Note. That way I get LTE, but I also get the sane button layout with physical home key capable of waking the screen. I'm pretty disappointed with the layout on the AT&T Note. If they must insist on the crappy 4-strip of capacitive buttons, they could've at least put the less used search on the far left, which is the hardest place to reach, leaving home, back, and menu easier to hit one-handed.
I don't think is screen related. The processor in the international version is supposed to be faster, which is what makes it smoother man.
Sent from my SAMSUNG-SGH-I717 using xda premium
****x76 said:
I don't think is screen related. The processor in the international version is supposed to be faster, which is what makes it smoother man.
Sent from my SAMSUNG-SGH-I717 using xda premium
Click to expand...
Click to collapse
It's probably a bad thread title, but what he means is put the entire front assembly from the I717 on the N7000 so that he has international internals with a four-capacitive-button layout. The display panels should be identical, yes.
maxh said:
I'd rather go the other way. I want to put the screen/buttons from my international note into my AT&T Note. That way I get LTE, but I also get the sane button layout with physical home key capable of waking the screen. I'm pretty disappointed with the layout on the AT&T Note. If they must insist on the crappy 4-strip of capacitive buttons, they could've at least put the less used search on the far left, which is the hardest place to reach, leaving home, back, and menu easier to hit one-handed.
Click to expand...
Click to collapse
+1
Sent from my SGH-I717R using xda premium
Update
Welp, I took both devices apart yesterday and here are the photos.
As one can see the LCD assembly chassis are slightly different between the two versions, thus I was unable to swap the screens. Although I felt if I separated the LCD chassis from the LCD itself I might have succeeded. However this step would have exposed the LCD to particulates, i.e. dust, and would have been a pain to perform without a clean room.
There are some slight differences in the "guts" of the system. Mainly the memory card reader in the International Note (IN) is soldered onto the board vs. the AT&T version which is connected via a cable.
The speaker/usb charger portion also had slight differences which I failed to take an adequate photo of. The ATT version seemed to be adhered to the chassis while the IN could be removed, hence the picture without the speaker.
Both devices have been reassembled and it was fun to compare between the two.
Cheers

Zero Shutter Lag?

I have searched around & cant seem to find much on this everything seems to keep coming up for the Nexus or S3.
Is zero shutter lag possible on the S2?
Thanks
no, it's hardware thing not software modification.
heahmad said:
no, it's hardware thing not software modification.
Click to expand...
Click to collapse
Come on man....Don't give him false information -.-
Of course you can add it. You can also increase the resolution of the phone, the size of the screen. And last but not least this site will show you how to get your phone to make you a sandwich!
**Sarcasm**
Have a nice day!
Quite a few years ago back when cameras on phones were starting to become the norm, a friend was looking in a phone shop. He was looking at a fairly basic phone which didn't have a camera. A salesman then came over and told him that whilst the phone he was looking at didn't have a camera, he could download one afterwards. The same salesman told me that the phone's screen could display 64k colours. I told him that I don't think I could even name 64 colours, let alone 64 thousand. Fun times.
I heard you can download a bigger battery onto your phone too (full instructions here)
= please delete =
yes its possible to have zero lag
i have an app on my s2 that can capture 12 pic's per second
DR.DROID. said:
yes its possible to have zero lag
i have an app on my s2 that can capture 12 pic's per second
Click to expand...
Click to collapse
that's called burst shot
@op
xda is not wikipedia
So your first search should be made on google, if you still feel like not getting any answer then you have to come here
Sent from my GT-I9100 using Tapatalk 2
And back to the correct answer........ its the hardware thingy, so suck it up.
Sent from my GT-I9100 using Tapatalk 2
atifsh said:
And back to the correct answer........ its the hardware thingy, so suck it up.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Samsung Galaxy SII plus has Zero Shutter lag.
Its the same hardware with nfc
Maybe we will be able to port it over S2.
Fingers crossed
Chairmansaab said:
Samsung Galaxy SII plus has Zero Shutter lag.
Its the same hardware with nfc
Maybe we will be able to port it over S2.
Fingers crossed
Click to expand...
Click to collapse
No, s2 plus has different hardware, it's not using exynos chip and the camera sensor is different too.. so yeah, we just can't add zero shutter lag to old s2 cause it's hardware thingy.. (though it would be great if it can lol)

[Q] connect the dots password ?

new to android and the S3.
i've seen people unlock their phones be swiping / connecting dots. is this functionality built into the S3?
i'm running AT&T S3 16gb.
Yes
Settings -security- screen lock- pattern.
To unroot and return your galaxy S3 to stock for warranty watch this. http://www.youtube.com/watch?v=_8Tga_yKywc&feature=youtube_gdata_player
ehaze said:
new to android and the S3.
i've seen people unlock their phones be swiping / connecting dots. is this functionality built into the S3?
i'm running AT&T S3 16gb.
Click to expand...
Click to collapse
yes. settings->security->screen lock->pattern. I also use 'make pattern visible'.
If you value your security, don't use it. In most cases it's sufficient to look at the phone from an angle to see the smear of the unlock pattern.
And since there are 2 directions it's not hard to guess =)
PIN-Codes are a lot harder since you usually have other similar marks on the phone too.
I use it to prevent the phone from accidentally unlocking in my pocket or when idly playing around with the screen.
d4fseeker said:
And since there are 2 directions it's not hard to guess =)
PIN-Codes are a lot harder since you usually have other similar marks on the phone too.
Click to expand...
Click to collapse
This was my next question, thank you!

Categories

Resources