question

Andre Linoge avatar image
Andre Linoge asked

Kindle Fire HD 8.9" - touch down events sometimes not reported

Hi, I am working on bringing a racing game to the Amazon store and have encountered a touch input issue that affects the Kindle Fire HD 8.9" but not the new Kindle Fire HDX 7" (checked these devices so far). It makes the controls a bit frustrating to use so any insight would be appreciated. The app is a native app. We have reproduced the problem when building against NDK r8b, r8d and r9c; we use unmodified native app glue for receiving input events. The game processes the events in an input handler where we log the type of event received. When pressing one finger down on the screen e.g. on an onscreen accelerator pedal, and tapping another, the pointer down and pointer up events on the second tap are sometimes not registered. We see this when logging the event types received in our input handler: int32_t android_handle_input(struct android_app* app, AInputEvent* event), and noting the occasional missing AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP events. I'm still looking into the problem so might have more info soon. I was wondering whether this was a known OS or device issue, and whether anyone else here has had similar experiences.
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
The issue doesn't affect the HDX 8.9" or original 7" Kindle Fire either. To be clear, what I meant above is that when holding one finger down on the screen and tapping with a second finger, the touch down and touch up events are occasionally missed. Also there isn't a clear relationship between how rapidly I tap, sometimes tapping slowly does not generate the events.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Andre, Can you please provide a sample code to demonstrate that how you are measuring the touch down events in the native code? Also, it would be helpful if you could write up for building apk around your native code. Before going to respective team with the issue I need to present it in a sample app. Thanks for reporting this.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
We were able to reproduce the problem while using this multitouch test app from the Amazon store: http://www.amazon.com/Developer-Multitouch-Test/dp/B004TSGBQ6/ref=sr_1_1?s=mobile-apps&ie=UTF8&qid=1390216310&sr=1-1&keywords=multitouch+test In our racing game we log all the received touch events and the action type. What we are seeing is that touch down events are sometimes not received while holding one finger down on the screen and tapping with a second finger. I cannot share our source code but the issue would be easily reproducible using a multitouch test app. If not then our device may be faulty, we have only tested this on one 8.9" Kindle Fire HD. Thank you for your help.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
Hi, we got hold of a second Kindle Fire HD 8.9" and was able to reproduce this. So it wasn't that the particular device we were testing on was faulty. I noticed a message spammed in logcat after all touch events during debugging, unsure if it is relevant though: channel ' (client)' ~ Failed to receive dispatch signal. status=-11. Thank you for your help.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Andre, I tested the "Multitouch Test" in our end in Kindle HD 8.9 and unable to reproduce any issue with multi touch as you said. The OS version of my device is 8.4.6_user_4620220. Can you please confirm the OS version of your device? I can see your app is in progress state in developer portal. Can you please upload the binary so that I can test it?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
OS version 8.4.6. This is my personal account, not my client's, and so I cannot upload an .apk now. However I will request this. I have seen this issue on two devices running this version straight after rebooting each device. Here is how I reproduce the issue in the racing app and the "multitouch test app": 1) Place the Kindle Fire HD 8.9" flat on a desk 2) Place and hold your left index finger on the lower left side of the screen (creates a blue touch circle id0=0) and hold it still 3) Repeatedly tap your right index on the lower right side of the screen. This will usually create a red touch circle id1=1, but sometimes no touch will be detected. Moving either finger on the screen at all will cause the second touch circle to appear. Like my client's app, the multitouch test app does not exhibit the issue on the Kindle Fire HDX 7" OS 13.3.1.0.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
Clarification: when both fingers are pressed to the screen but the second "red touch circle" is not shown (i.e. the touch was not detected), moving either finger at all (triggering more motion events), causes both circles to display as expected. Also, thank you once again for your help.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jesseni avatar image
jesseni answered
I am seeing exactly the same behavior as Andre in both my custom app and in the Multitouch Test app. I am testing on a Kindle Fire HD 8.9" (2nd gen) with OS 8.4.6_user_4620220. I don't have another Kindle to test on but I have tried it on a couple other Android tablets and have not been able to reproduce the issue.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jesseni avatar image
jesseni answered
Here is some sample code that I can use to reproduce the issue. It's printing to a TextView on the main activity but you could just as well write to System.out. If I hold down with one finger and then tap with a second finger, I see that event.getPointerCount() is sometimes 1 and sometimes 2. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); final TextView textView = (TextView)rootView.findViewById(R.id.MyTextView); View.OnTouchListener touchListener = new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { String result = "PointerCount=" + event.getPointerCount() + ", Action=" + eventActionToString(event.getAction()); textView.setText(result + "\n" + textView.getText()); return true; } public String eventActionToString(int eventAction) { switch (eventAction) { case MotionEvent.ACTION_CANCEL: return "Cancel"; case MotionEvent.ACTION_DOWN: return "Down"; case MotionEvent.ACTION_MOVE: return "Move"; case MotionEvent.ACTION_OUTSIDE: return "Outside"; case MotionEvent.ACTION_UP: return "Up"; case MotionEvent.ACTION_POINTER_DOWN: return "Pointer Down"; case MotionEvent.ACTION_POINTER_UP: return "Pointer Up"; case MotionEvent.ACTION_POINTER_2_DOWN: return "Pointer 2 Down"; case MotionEvent.ACTION_POINTER_2_UP: return "Pointer 2 Up"; } return ""; } }; rootView.setOnTouchListener(touchListener); return rootView; }
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Linoge avatar image
Andre Linoge answered
Hopefully someone at Amazon will be able to reproduce and look into the issue, as I'm sure it's just not us that are affected.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.