AndroidContext

Process-wide Android JNI bootstrap for SDK platform services.

#include <android_context.hpp>

Classes

class ROGUE_SDK_API

Static bootstrap interface for providing Android JNI context to the SDK.

Note:

All methods must be called from the application's JNI layer before any SDK subsystem is attached. The class is not instantiable.

static auto SetJvm(JavaVM* vm) -> void

Registers the process-wide JavaVM with the SDK.

Note:

Call once from JNI_OnLoad.

ParameterTypeDescription
vm JavaVM* The JavaVM pointer provided by the JNI runtime.
static auto SetService(JNIEnv* env, jobject service) -> void

Registers the platform service object with the SDK.

Note:

Call once from the matching JNI entry point after the service is created. Releases any previously held reference on subsequent calls.

ParameterTypeDescription
env JNIEnv* The JNI environment for the calling thread.
service jobject The platform service object to cache.
static auto SetActiveNetwork(uint64_t network_handle) -> void

Updates the active Android network handle used by SDK networking.

Note:

Call from the application's network callback whenever the active network changes. Pass 0 to clear the current handle.

ParameterTypeDescription
network_handle uint64_t Handle identifying the active network, as returned