pub struct AndroidApp { /* private fields */ }

Implementations

Queries the current NativeWindow for the application.

This will only return Some(window) between [AndroidAppMainEvent::InitWindow] and [AndroidAppMainEvent::TerminateWindow] events.

Polls for any events associated with this AndroidApp and processes those events (such as lifecycle events) via the given callback.

It’s important to use this API for polling, and not call [ALooper_pollAll] directly since some events require pre- and post-processing either side of the callback. For correct behavior events should be handled immediately, before returning from the callback and not simply queued for batch processing later. For example the existing NativeWindow is accessible during a MainEvent::TerminateWindow callback and will be set to None once the callback returns, and this is also synchronized with the Java main thread. The MainEvent::SaveState event is also synchronized with the Java main thread.

Creates a means to wake up the main loop while it is blocked waiting for events within [poll_events()].

Returns a (cheaply clonable) reference to this application’s [Configuration]

Queries the current content rectangle of the window; this is the area where the window’s content should be placed to be seen by the user.

Queries the Asset Manager instance for the application.

Use this to access binary assets bundled inside your application’s .apk file.

The user-visible SDK version of the framework

Also referred to as Build.VERSION_CODES

Path to this application’s internal data directory

Path to this application’s external data directory

Path to the directory containing the application’s OBB files (if any).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.