Represents the AppView2D or AppView3D Kanzi node.
More...
Inherits AppViewControllerDirectorBase.
|
void | onEmbeddedApplicationStarted () |
| Notifies a corresponding AppView node that the application started.
|
|
void | onEmbeddedApplicationStopped () |
| Notifies a corresponding AppView node that the running application stopped.
|
|
void | onFrameAvailable () |
| Notifies a corresponding AppView node that a new frame is available.
|
|
|
boolean | acquireDisplay (String virtualDisplayName) |
|
String | getAppName () |
| Returns the embedded activity component name.
|
|
int | getTextureId () |
|
long | getVirtualDisplayDensity () |
|
long | getVirtualDisplayHeight () |
|
String | getVirtualDisplayName () |
|
long | getVirtualDisplayWidth () |
|
boolean | initializeDisplay (int virtualDisplayWidth, int virtualDisplayHeight, int virtualDisplayDensity) |
| Initializes a virtual display backed by the given texture.
|
|
boolean | injectPointerEvents (int event, int pointerIndex, TouchPointInfoVector pointers) |
|
boolean | navigateBack () |
| Performs back navigation inside the virtual display.
|
|
void | pauseApp () |
| Pauses the embedded app.
|
|
void | releaseDisplay () |
| Releases resources.
|
|
void | resumeApp () |
| Resumes the embedded app.
|
|
boolean | startApp (String appName, boolean canExitApp) |
| Starts the given app inside the virtual display.
|
|
boolean | updateDisplay (int newDisplayWidth, int newDisplayHeight, int newDisplayDensity) |
| Updates the virtual display paramaters.
|
|
float[] | updateTextureContent () |
| Updates pixels on an output texture.
|
|
Represents the AppView2D or AppView3D Kanzi node.
◆ getAppName()
Returns the embedded activity component name.
AppViewController is in charge of running that component. Used in the native layer to make sure that the Kanzi.AppViewConcept.EmbeddedActivityComponentName property has a matching value.
- Returns
- The embedded activity component name or empty string. Returns an empty string when the embedded activity is not running or has stopped.
◆ initializeDisplay()
boolean initializeDisplay |
( |
int | virtualDisplayWidth, |
|
|
int | virtualDisplayHeight, |
|
|
int | virtualDisplayDensity ) |
|
protected |
Initializes a virtual display backed by the given texture.
- Parameters
-
virtualDisplayWidth | Virtual display width |
virtualDisplayHeight | Virtual display height |
virtualDisplayDensity | Virtual display density (dpi) |
- Returns
- True on success, false on error.
◆ navigateBack()
Performs back navigation inside the virtual display.
It has the same effect as pressing the back button on an Android device.
- Returns
- True on success, false on error.
◆ onEmbeddedApplicationStarted()
void onEmbeddedApplicationStarted |
( |
| ) |
|
Notifies a corresponding AppView node that the application started.
When called, the AppView node starts displaying the associated external texture in the Kanzi UI scene.
◆ onEmbeddedApplicationStopped()
void onEmbeddedApplicationStopped |
( |
| ) |
|
Notifies a corresponding AppView node that the running application stopped.
When called, the AppView node restores its original state. In this state, it renders nothing.
◆ releaseDisplay()
Releases resources.
Destroys the virtual display and stops the app running inside the AppView.
◆ startApp()
boolean startApp |
( |
String | appName, |
|
|
boolean | canExitApp ) |
|
protected |
Starts the given app inside the virtual display.
- Parameters
-
appName | The app name. Formatted as "package.name/activity.name". See ComponentName.unflattenFromString() for details. |
canExitApp | True if it's allowed to exit the app via navigateBack() |
- Returns
- True on success, false on error.
◆ updateDisplay()
boolean updateDisplay |
( |
int | newDisplayWidth, |
|
|
int | newDisplayHeight, |
|
|
int | newDisplayDensity ) |
|
protected |
Updates the virtual display paramaters.
- Parameters
-
newDisplayWidth | The new virtual display width |
newDisplayHeight | The new virtual display height |
newDisplayDensity | The new virtual display density (dpi) |
- Returns
- True on success, false on error.
◆ updateTextureContent()
float[] updateTextureContent |
( |
| ) |
|
|
protected |
Updates pixels on an output texture.
- Returns
- An array that contains the texture transformation matrix. If there is no new texture content, returns null. Returns the same array every time. Therefore the caller does not have to keep or modify the previous values.