Friday, February 8, 2013

Erratic Touchscreen Solution (Chinese Android Tablets)

Hi

Just wanted to share my experience with Chinese Android tablets with erratic touchscreens. Although the touch screens are erratic but you can handle the erratic touches in your APK. The conclusion of the research is once you "Touchdown" and keep it down there will be number of other erratic touch downs and up's at different locations and then when you finally release your finger you will have a "Touchup" of your original press.

The point is that you need to use the last touchup.. Which you can simply find by the following algorithm

make a counter

int touchCounter=0;

On Touchdown() ---> counter++;

On Touchup()
             ------> counter--;
             ------> if (counter==0)
             ------>          doWhatEver();
             ------> else
             ------->          return false;

All of this will go in your button press events for touchdown and touchup... dont use Clicks... you need your code to work on touch up....

Let me know if you have any questions or comments...


Regards
Umer
http://www.stickpos.com



No comments:

Post a Comment