Allow passing a proper activity pointer to the android loader#219
Merged
Ralith merged 2 commits intoJun 4, 2026
Merged
Conversation
Extends 613af27 to also use the provided activity pointer for loader initialization. This was necessary to get android-activity 0.6.1 running on my quest 3.
Ralith
approved these changes
Jun 4, 2026
Ralith
left a comment
Owner
There was a problem hiding this comment.
Thanks! I think this makes sense. It'd be nice to have better ergonomics by saving the data, but if it were that easy I assume OpenXR would do so itself, so probably good to respect the underlying pattern here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the PlatformInfo trait introduced in #217 to also handle android loader initialization.
Previously, only
create_instanceused the user-provided activity pointer fromAndroidPlatformInfo, whileinitialize_android_loaderstill relied on ndk_context. That should actually work based on the spec (XR_KHR_loader_init_android just requires anyandroid.content.Context), but it wasn't enough when testing android-activity 0.6.1 on my quest 3.I decided against storing the
PlatformInfofrom the constructors inEntrybecause that would makeEntry!Syncby default and I am not 100% sure if implementing it manually would be correct here. Keeping it like this is also more flexible because it allows users to pass different pointers toinit_loaderandcreate_instance(I don't see when that would be neccessary, but it could be useful for debugging).