Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Is android’s motion event handling accurate??

Is android’s motion event handling accurate??

Put your problem here if it does not fit any of the other categories.

Is android’s motion event handling accurate??

Postby peterdk » Sun Jun 06, 2010 4:08 pm

Bug
I have a weird bug in my piano app. Sometimes keys (and thus notes) hang. I did a lot of debugging and narrowed it down to what looks like androids inaccuracy of motion event handling:

Code: Select all
DEBUG/(2091): ACTION_DOWN A4
DEBUG/(2091): KeyDown: A4
DEBUG/(2091): ACTION_MOVE A4 => A4
DEBUG/(2091): ACTION_MOVE ignoring
DEBUG/(2091): ACTION_MOVE A4 => A4
DEBUG/(2091): ACTION_MOVE ignoring
DEBUG/(2091): ACTION_MOVE A4 => A4
DEBUG/(2091): ACTION_MOVE ignoring
DEBUG/(2091): ACTION_UP B4 //HOW CAN THIS BE????
DEBUG/(2091): KeyUp: B4
DEBUG/(2091): Stream is null, can't stop
DEBUG/(2091): Hanging Note: A4 X=240-287 EventX=292 Y=117-200 EventY=164
DEBUG/(2091): KeyUp Note:   B4 X=288-335 EventX=292 Y=117-200 EventY=164


Clearly it can be seen here that out of nowhere I suddenly have an ACTION_UP for another note. Shouldn't I definitely get a ACTION_MOVE first?

As shown in the end of the log, it's definitely not an error in region detection, since the ACTION_UP event is clearly in the B4 region.

Logging Implementation details
Every onTouchEvent() call is logged, so the log is accurate.

The relevant pseudo-code for the ACTION_MOVE logging is:
Code: Select all
Key oldKey = Key.get(event.getHistoricalX(), event.getHistoricalY());
Key newKey = Key.get(event.getX(), event.getY());


Question
Is this normal behaviour for Android (the jumping in coordinates)? Am I missing something?
peterdk
Freshman
Freshman
 
Posts: 2
Joined: Sun Jun 06, 2010 4:00 pm

Top

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 15 guests