Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Back button key down event targetsdk v28 #73

Closed
marchbold opened this issue Aug 6, 2019 · 3 comments

Comments

@marchbold
Copy link

commented Aug 6, 2019

Problem Description

The KeyboardEvent.KEY_DOWN event fails to get dispatched when pressing the back button on Android and targeting SDK v28.

This occurs with 32.0.0.116 (Adobe) and 33.0.0.212 (Harman)

Steps to Reproduce

With target 27 the following will catch the back button and prevent the app from minimising:

NativeApplication.nativeApplication.addEventListener( KeyboardEvent.KEY_DOWN, keyDownHandler );

function keyDownHandler( event:KeyboardEvent ):void
{
	trace( event.keyCode );
	if (event.keyCode == Keyboard.BACK)
	{
		event.preventDefault();
	}
}

(Same occurs with the stage).

When we change to target sdk 28 this event is not triggered. I.e. the following is added to the manifest additions:

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />

Known Workarounds

Reduce targetSdkVersion to 27.

@ajwfrost

This comment has been minimized.

Copy link
Collaborator

commented Aug 6, 2019

Thanks to further input from @marchbold we should have the root cause of this problem and are intending to fix that in this week's SDK release...

@marchbold

This comment has been minimized.

Copy link
Author

commented Aug 7, 2019

@ajwfrost Cheers Andrew!

We also have an ANE resolution for anyone needing an immediate fix for AIR 32.

@ajwfrost

This comment has been minimized.

Copy link
Collaborator

commented Aug 16, 2019

Fixed in AIR 33.0.1.220 (or via ANE for previous versions, see updates above)

@ajwfrost ajwfrost closed this Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.