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.

Introduced properties

fun env: JniEnv

android :: NdkNativeActivity :: env

JNI environmnet associated to self
fun external_data_path: CString

android :: NdkNativeActivity :: external_data_path

Path to this application's external (removable/mountable) data directory.
fun instance: Pointer

android :: NdkNativeActivity :: instance

This is the native instance of the application. It is not used by
fun internal_data_path: CString

android :: NdkNativeActivity :: internal_data_path

Path to this application's internal data directory.
fun java_native_activity: NativeActivity

android :: NdkNativeActivity :: java_native_activity

The NativeActivity, as in the Java object, associated to self
fun sdk_version: Int

android :: NdkNativeActivity :: sdk_version

The platform's SDK version code.
fun vm: JavaVM

android :: NdkNativeActivity :: vm

Java VM associated to self

Redefined properties

redef type SELF: NdkNativeActivity

android $ NdkNativeActivity :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun address_is_null: Bool

core :: Pointer :: address_is_null

Is the address behind this Object at NULL?
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun env: JniEnv

android :: NdkNativeActivity :: env

JNI environmnet associated to self
fun external_data_path: CString

android :: NdkNativeActivity :: external_data_path

Path to this application's external (removable/mountable) data directory.
fun free

core :: Pointer :: free

Free the memory pointed by this pointer
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun instance: Pointer

android :: NdkNativeActivity :: instance

This is the native instance of the application. It is not used by
fun internal_data_path: CString

android :: NdkNativeActivity :: internal_data_path

Path to this application's internal data directory.
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun java_native_activity: NativeActivity

android :: NdkNativeActivity :: java_native_activity

The NativeActivity, as in the Java object, associated to self
init nul: Pointer

core :: Pointer :: nul

C NULL pointer
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun sdk_version: Int

android :: NdkNativeActivity :: sdk_version

The platform's SDK version code.
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun vm: JavaVM

android :: NdkNativeActivity :: vm

Java VM associated to self
package_diagram android::NdkNativeActivity NdkNativeActivity core::Pointer Pointer android::NdkNativeActivity->core::Pointer core::Object Object core::Pointer->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

extern class Pointer

core :: Pointer

Pointer classes are used to manipulate extern C structures.

Class definitions

android $ NdkNativeActivity
# 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