Replies: 1 comment 7 replies
-
|
https://developer.android.com/games/agdk/game-activity is probably as close as it gets, since that's the successor to the file shipped in the NDK. We keep the one in the NDK around to avoid unnecessarily breaking builds (and even our NDK samples haven't all migrated to game activity yet), but any new feature development goes into For your specific question of why Like I said I'm not an expert at this, but I think trying to hide that detail from the developer is probably a mistake. If I were writing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on using Rust for a native app. I tried using the
android-activitycrate but it appears they didn't exposeMotionEventhistory, which I need. So I went to look at the implementation of that crate, to see about rolling my own. It uses thendkandndk-syscrates (FFI wrappers of the NDK) and appears to implement a Rust version of this file: android_native_app_glue.cThat file seems to contain know-how that I don't see documented in the NDK Guides. For example, they create a new thread in
ANativeActivity_onCreateand use that new thread for the native event loop. This is different from iOS where my Objective-C and Rust code all runs on the same "UI/main" thread. Is this kind of thing documented somewhere, or should I just try to learn from what's inandroid_native_app_glue.c?Beta Was this translation helpful? Give feedback.
All reactions