High temperature touch compatibility issues

After the release of my product, I began to receive complaints that some screen did not work on some phones. After many studies and many attempts to solve this problem, I found out that these phones, which are controlled by heat rather than pressure, have this problem. Unfortunately, I just identified the problem. What happens is mouse movement and mouse movement, it seems the same movement. This is how my code works:

if(event.getAction()==MotionEvent.ACTION_MOVE) { lockdown=true; } else if(event.getAction()==MotionEvent.ACTION_UP && lockdown==false) { ... } else if(event.getAction()==MotionEvent.ACTION_UP) { ... lockdown=false; } 

This code works on a touch phone with voltage, just like mine, is just fine. He thought that when you touch him, some things will not function. I could really use some insight on how to fix this problem.

+4
source share
1 answer

after a tiring night going back and forth with my testers, this is what ive came up with

 // somewhere in the prior code a pressure sample is needed public float dwnPressure if(event.getAction()==MotionEvent.ACTION_DOWN) { dwnPressure=float(event.getPressure()*0.99) } 

return to the code where I had problems

 if(event.getAction()==MotionEvent.ACTION_MOVE) { if(event.getPressure>dwnPressure) { lockdown=true; } } else if(event.getAction()==MotionEvent.ACTION_UP && lockdown==false) { ... } else if(event.getAction()==MotionEvent.ACTION_UP) { ... lockdown=false; } 

This change works fine on some phones that have had a problem. Some phones have a significant performance improvement, but a bit went. I decided that id would at least share my hard work, even if itโ€™s not 100%, since I didnโ€™t answer this question as quickly as I used for stackoverflow

+2
source

Source: https://habr.com/ru/post/1396109/


All Articles