MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
android.h File Reference

Go to the source code of this file.

Functions

mln_status mln_android_init (void *jni_env, void *jni_class, void *context)
 

Detailed Description

Public C API declarations for Android process integration.

Function Documentation

◆ mln_android_init()

mln_status mln_android_init ( void * jni_env,
void * jni_class,
void * context )

Initializes Android platform services that require access to the host app.

This function is required before Android HTTP requests can validate TLS using the app's platform trust policy. The host must package the rustls-platform-verifier Android component in the APK or AAB.

jni_env must be a JNIEnv* valid for the calling thread. jni_class is accepted for static JNI binding adapters and ignored by the implementation; direct C callers may pass null. context must be an Android android.content.Context object. Any Context subtype may be passed; the implementation resolves and stores the process application context when initialization succeeds. All pointers are borrowed for the duration of the call.

May be called from any thread that is attached to the JVM.

Returns:

  • MLN_STATUS_OK when initialization succeeds or was already completed;
  • MLN_STATUS_INVALID_ARGUMENT when jni_env or context is null;
  • MLN_STATUS_UNSUPPORTED when this library was not built for Android;
  • MLN_STATUS_NATIVE_ERROR when Android verifier initialization fails.