AppViewBackend allows you to extend the backend of AppView. More...
Classes | |
| enum | TouchState |
Public Member Functions | |
| String | getAppName () |
| Returns the name of the application that currently runs in the backend. | |
| int | getDensity () |
| Returns the density of the backend. | |
| int | getHeight () |
| Returns the height of the backend. | |
| String | getName () |
| Returns the name of the backend. | |
| int | getTextureId () |
| Returns the ID of the external GLES texture associated with the backend. | |
| int | getWidth () |
| Returns the width of the backend. | |
| boolean | initialize (int displayWidth, int displayHeight, int displayDensity) |
| Initializes the backend with the specified parameters. | |
| boolean | injectPointerEvent (MotionEvent event) |
| Injects a touch event to the backend. | |
| boolean | navigateBack () |
| Performs back navigation inside the backend. | |
| void | pauseApp () |
| Pauses the application inside the AppView backend. | |
| void | resumeApp () |
| Resumes the application inside the AppView backend. | |
| void | setContext (Context context) |
| Sets the Android context. | |
| boolean | startApp (String appName, boolean canExitApp) |
| Starts a given application inside the AppView backend. | |
| boolean | updateDisplay (int newDisplayWidth, int newDisplayHeight, int newDisplayDensity) |
| Updates the virtual display parameters. | |
| float[] | updateTextureContent () |
| Updates pixels on an output texture. | |
AppViewBackend allows you to extend the backend of AppView.
The available extension points are:
| String getAppName | ( | ) |
Returns the name of the application that currently runs in the backend.
| int getDensity | ( | ) |
Returns the density of the backend.
| int getHeight | ( | ) |
Returns the height of the backend.
| String getName | ( | ) |
Returns the name of the backend.
| int getTextureId | ( | ) |
Returns the ID of the external GLES texture associated with the backend.
| int getWidth | ( | ) |
Returns the width of the backend.
| boolean initialize | ( | int | displayWidth, |
| int | displayHeight, | ||
| int | displayDensity ) |
Initializes the backend with the specified parameters.
When the backend is initialized, the getTextureId() returns a valid ID of the external GLES texture.
| displayWidth | Backend width. |
| displayHeight | Backend height. |
| displayDensity | Backend density. |
| boolean injectPointerEvent | ( | MotionEvent | event | ) |
Injects a touch event to the backend.
AppView calls this method when a touch event happens at the area of the AppView node associated with the backend.
| event | MotionEvent instance. |
| boolean navigateBack | ( | ) |
Performs back navigation inside the backend.
This has the same effect as pressing the back button on an Android device.
| void setContext | ( | Context | context | ) |
Sets the Android context.
| context | The context of the hosting Android activity. |
| boolean startApp | ( | String | appName, |
| boolean | canExitApp ) |
Starts a given application inside the AppView backend.
| appName | The name of the app formatted as "package.name/activity.name". See android.content.ComponentName.unflattenFromString(). |
| canExitApp | Whether to allow exiting the application with AppViewBackend#navigateBack(). |
| boolean updateDisplay | ( | int | newDisplayWidth, |
| int | newDisplayHeight, | ||
| int | newDisplayDensity ) |
Updates the virtual display parameters.
You cannot change the name of the virtual display after that display has been created.
| newDisplayWidth | The new width of the virtual display. |
| newDisplayHeight | The new height of the virtual display. |
| newDisplayDensity | The new density (dpi) of the virtual display. |
| float[] updateTextureContent | ( | ) |
Updates pixels on an output texture.