NativeActivity
which is the Java part.
The callbacks at this level are synchronous on the UI thread. Thus app.nit
do not use them, and instead rely on NativeAppGlue
.
android :: NdkNativeActivity :: external_data_path
Path to this application's external (removable/mountable) data directory.android :: NdkNativeActivity :: instance
This is the native instance of the application. It is not used byandroid :: NdkNativeActivity :: internal_data_path
Path to this application's internal data directory.android :: NdkNativeActivity :: java_native_activity
TheNativeActivity
, as in the Java object, associated to self
android $ NdkNativeActivity :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Pointer :: defaultinit
android :: NdkNativeActivity :: external_data_path
Path to this application's external (removable/mountable) data directory.android :: NdkNativeActivity :: instance
This is the native instance of the application. It is not used byandroid :: NdkNativeActivity :: internal_data_path
Path to this application's internal data directory.core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
android :: NdkNativeActivity :: java_native_activity
TheNativeActivity
, as in the Java object, associated to self
core :: Object :: output_class_name
Display class name on stdout (debug only).
# An Android activity implemented in C. This is the C part of `NativeActivity`
# which is the Java part.
#
# The callbacks at this level are synchronous on the UI thread. Thus app.nit
# do not use them, and instead rely on `NativeAppGlue`.
extern class NdkNativeActivity `{ ANativeActivity * `}
# Callbacks on the main thread
# FIXME This would not yet be usable, to implement when Nit has threads
#fun set_callbacks_handler(handler: App) or callbacks= ...
# Java VM associated to `self`
fun vm: JavaVM `{ return self->vm; `}
# JNI environmnet associated to `self`
fun env: JniEnv `{ return self->env; `}
# The `NativeActivity`, as in the Java object, associated to `self`
fun java_native_activity: NativeActivity `{ return self->clazz; `}
# Path to this application's internal data directory.
fun internal_data_path: CString `{ return (char*)self->internalDataPath; `}
# Path to this application's external (removable/mountable) data directory.
fun external_data_path: CString `{ return (char*)self->externalDataPath; `}
# The platform's SDK version code.
fun sdk_version: Int `{ return self->sdkVersion; `}
# This is the native instance of the application. It is not used by
# the framework, but can be set by the application to its own instance
# state.
fun instance: Pointer `{ return self->instance; `}
# Pointer to the Asset Manager instance for the application. The application
# uses this to access binary assets bundled inside its own .apk file.
#
# TODO activate in a future `asset_manager` module if it cannot be done in Java
#fun asset_manager: AssetManager `{ return self->assetManager; `}
# Available starting with Honeycomb: path to the directory containing
# the application's OBB files (if any). If the app doesn't have any
# OBB files, this directory may not exist.
# api?
#
# TODO activate in a future module at API 11
#fun obb_path: CString `{ return (char*)self->obbPath; `}
end
lib/android/native_app_glue.nit:267,1--314,3