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

[AOSP] Migrate to GameActivity #1554

Merged
merged 1 commit into from
Oct 3, 2024
Merged

[AOSP] Migrate to GameActivity #1554

merged 1 commit into from
Oct 3, 2024

Conversation

svillar
Copy link
Member

@svillar svillar commented Oct 2, 2024

NativeActivity was the original choice for the Android activity for the AOSP port because it's a natural choice for an activity with native code. That was causing issues in MagicLeap2 because key strokes in external bluetooth keyboards were filtered out.

By switching to GameActivity we can get rid of that limitation. The migration only required an small adjustment in the back button handling code because the onKeyUp() event for the back button was not triggering the onBackPressed() as it does in NativeActivity.

NativeActivity was the original choice for the Android activity for
the AOSP port because it's a natural choice for an activity with
native code. That was causing issues in MagicLeap2 because key
strokes in external bluetooth keyboards were filtered out.

By switching to GameActivity we can get rid of that limitation.
The migration only required an small adjustment in the back button
handling code because the onKeyUp() event for the back button was
not triggering the onBackPressed() as it does in NativeActivity.
Copy link
Member

@javifernandez javifernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks in general. I haven't tied it on any AOSP device yet, since I've don't have a keyboard at this moment.

@svillar svillar merged commit 6d8007f into main Oct 3, 2024
22 checks passed
@svillar svillar deleted the game_activity_aosp branch October 3, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants