Why does the touchpad on Gear VR fire multiple release events?

UE4 version 4.7.2 binary.

For some reason I am getting three Touch Released events for ever single Touch Pressed on the Gear VR touchpad, as well as a mouse button UP.

Additionally, the Gear VR BACK button is firing an Android Back as well as two Touch Released.

Frustrating because it seems hard to filter out. The Finger Index for all these touches is the same – Touch1.

In both of the instances below I am simply pressing the touchpad once and releasing, then pushing the back button once and releasing.

Logcat output of a touchpad press:

D/InputReader(  978): Input event: value=1
I/InputDispatcher(  978): Delivering touch to (18247): action: 0x0, toolType: 3
D/lights  (  978): button : 1 +
D/lights  (  978): button : 1 -
D/UE4     (18247): [2015.03.12-03.55.58:622][  0]LogBlueprintUserMessages: TOUCH PRESSED Touch1 X=766.401 Y=486.324 Z=1.000
D/InputReader(  978): Input event: value=0
I/InputReader(  978): Mouse button UP numMappers=1, count=1
I/InputDispatcher(  978): Delivering touch to (18247): action: 0x1, toolType: 3
I/InputDispatcher(  978): Delivering touch to (18247): action: 0x9, toolType: 3
D/UE4     (18247): [2015.03.12-03.55.58:689][  0]LogBlueprintUserMessages: TOUCH RELEASED Touch1 X=766.401 Y=486.324 Z=0.000
D/UE4     (18247): [2015.03.12-03.55.58:690][  0]LogBlueprintUserMessages: TOUCH RELEASED Touch1 X=766.401 Y=486.324 Z=0.000
D/UE4     (18247): [2015.03.12-03.55.58:690][  0]LogBlueprintUserMessages: TOUCH RELEASED Touch1 X=766.401 Y=486.324 Z=0.000

Logcat of the BACK button being pressed:

D/InputReader(  978): Input event: value=1
D/PersonaManagerService(  978):  handle back called for user 0 back true
I/InputDispatcher(  978): Delivering key to (18247): action: 0x0 (0)
D/UE4     (18247): Received keycode: 4
D/UE4     (18247): Received key event: 4
D/UE4     (18247): [2015.03.12-03.56.01:894][  0]LogBlueprintUserMessages: ANDROID BACK
D/UE4     (18247): [2015.03.12-03.56.01:910][  0]LogBlueprintUserMessages: TOUCH RELEASED Touch1 X=639.500 Y=359.500 Z=0.000
D/InputReader(  978): Input event: value=0
D/InputDispatcher(  978): Waiting for application to become ready for input: xxxx Reason: Waiting because the focused window has not finished processing the input events that were previously delivered to it.
I/InputDispatcher(  978): Delivering key to (18247): action: 0x1 (0)
D/UE4     (18247): [2015.03.12-03.56.02:012][  0]LogBlueprintUserMessages: TOUCH RELEASED Touch1 X=639.500 Y=359.500 Z=0.000
D/UE4     (18247): Received keycode: 4
D/UE4     (18247): Received key event: 4

My blueprint is nothing special. This is what I’m currently using, attached to the level blueprint:

http://i.imgur.com/iQ2BLhe.png

I can confirm that this still is an issue with Unreal 4.7.5

This is still an issue in 4.9 ! Will this be fixed in 4.10 ? Since the GearVR customer release is approaching, it would be nice if this works as expected.

Same problem. Any workaround?

Hey guys,
Trying to repro the issue (and hopefully fix it) but how did you manage to make PrintString to work on Android? It doesn’t seem to do anything for me.

I connected adb wirelessly to the phone and ran logcat from the PC.

Yeah, I know, but for some reasons I don’t see anything what PrintString is trying to print out. I see them if I run on PC, but not on the phone (I see perfectly fine all other UE4 messages in logcat)

At the moment, I can offer the following hot-fix. Need to modify source code and build UE4.
File Engine\Source\Runtime\Launch\Private\Android\LaunchAndroid.cpp, method “static int32_t HandleInputCB(struct android_app* app, AInputEvent* event)”. Find the following ‘switch’ statement and add two lines with the ‘default’ case:

    			switch (actionType)
    			{
    			case AMOTION_EVENT_ACTION_DOWN:
    			case AMOTION_EVENT_ACTION_POINTER_DOWN:
    				type = TouchBegan;
    				break;
    			case AMOTION_EVENT_ACTION_MOVE:
    				type = TouchMoved;
    				break;
    			case AMOTION_EVENT_ACTION_UP:
    			case AMOTION_EVENT_ACTION_POINTER_UP:
    			case AMOTION_EVENT_ACTION_CANCEL:
    			case AMOTION_EVENT_ACTION_OUTSIDE:
    				type = TouchEnded;
    				break;
    
    			default:             // << ADD THESE LINES
    				return 0;   // << ADD THESE LINES
    			}

This is not final fix, but let me know if it works.

FYI: Chris Babcock from Epic has integrated this into 4.10, github: https://github.com/EpicGames/UnrealEngine/commit/a145f2ea578bb676426560914bf5ddc2be6e8fe7

Have you tried the fix posted in this thread?

Sorry but I’m not currently in a good position to test this. If someone will confirm that it works, I will mark this answer accepted.