|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
android.app.Activity
com.jme3.app.AndroidHarness
public class AndroidHarness
AndroidHarness
wraps a jme application object and runs it on
Android
Field Summary | |
---|---|
protected Application |
app
The jme3 application object |
protected java.lang.String |
appClass
The application class to start |
protected OGLESContext |
ctx
|
protected AndroidConfigChooser.ConfigType |
eglConfigType
ConfigType.FASTEST is RGB565, GLSurfaceView default ConfigType.BEST is RGBA8888 or better if supported by the hardware |
protected boolean |
eglConfigVerboseLogging
If true all valid and not valid egl configs are logged |
protected java.lang.String |
exitDialogMessage
Message of the exit dialog, default is "Use your home key to bring this app into the background or exit to terminate it." |
protected java.lang.String |
exitDialogTitle
Title of the exit dialog, default is "Do you want to exit?" |
protected boolean |
finishOnAppStop
if true finish this activity when the jme app is stopped |
protected android.widget.FrameLayout |
frameLayout
|
protected boolean |
handleExitHook
set to false if you don't want the harness to handle the exit hook |
protected boolean |
isGLThreadPaused
|
protected static java.util.logging.Logger |
logger
|
protected boolean |
mouseEventsEnabled
If true MouseEvents are generated from TouchEvents |
protected boolean |
mouseEventsInvertX
Flip X axis |
protected boolean |
mouseEventsInvertY
Flip Y axis |
protected boolean |
screenFullScreen
Set the screen window mode. |
protected int |
screenOrientation
Set the screen orientation, default is SENSOR ActivityInfo.SCREEN_ORIENTATION_* constants package android.content.pm.ActivityInfo SCREEN_ORIENTATION_UNSPECIFIED SCREEN_ORIENTATION_LANDSCAPE SCREEN_ORIENTATION_PORTRAIT SCREEN_ORIENTATION_USER SCREEN_ORIENTATION_BEHIND SCREEN_ORIENTATION_SENSOR (default) SCREEN_ORIENTATION_NOSENSOR |
protected boolean |
screenShowTitle
if screenShowTitle is true while screenFullScreen is false, then the title bar is also displayed under the notification bar |
protected android.widget.ImageView |
splashImageView
|
protected int |
splashPicID
Splash Screen picture Resource ID. |
protected android.opengl.GLSurfaceView |
view
|
Fields inherited from class android.app.Activity |
---|
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK |
Fields inherited from class android.content.Context |
---|
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE |
Constructor Summary | |
---|---|
AndroidHarness()
|
Method Summary | |
---|---|
void |
destroy()
Callback to indicate that the context has been destroyed (either by the user or requested by the application itself). |
void |
gainFocus()
Called when the application gained focus. |
Application |
getJmeApplication()
|
void |
handleError(java.lang.String errorMsg,
java.lang.Throwable t)
Called when an error has occurred. |
void |
initialize()
Callback to indicate the application to initialize. |
void |
layoutDisplay()
|
void |
loseFocus()
Called when the application lost focus. |
void |
onClick(android.content.DialogInterface dialog,
int whichButton)
Called by the android alert dialog, terminate the activity and OpenGL rendering |
void |
onCreate(android.os.Bundle savedInstanceState)
|
protected void |
onDestroy()
|
protected void |
onPause()
|
protected void |
onRestart()
|
protected void |
onResume()
|
java.lang.Object |
onRetainNonConfigurationInstance()
|
protected void |
onStart()
|
protected void |
onStop()
|
void |
onTouch(java.lang.String name,
TouchEvent evt,
float tpf)
Gets called by the InputManager on all touch/drag/scale events |
void |
removeSplashScreen()
|
void |
requestClose(boolean esc)
Called when the user requests to close the application. |
void |
reshape(int width,
int height)
Called to notify the application that the resolution has changed. |
void |
update()
Callback to update the application state, and render the scene to the back buffer. |
Methods inherited from class android.app.Activity |
---|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu |
Methods inherited from class android.view.ContextThemeWrapper |
---|
attachBaseContext, getTheme, setTheme |
Methods inherited from class android.content.ContextWrapper |
---|
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver |
Methods inherited from class android.content.Context |
---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.util.logging.Logger logger
protected java.lang.String appClass
protected Application app
protected AndroidConfigChooser.ConfigType eglConfigType
protected boolean eglConfigVerboseLogging
protected boolean mouseEventsEnabled
protected boolean mouseEventsInvertX
protected boolean mouseEventsInvertY
protected boolean finishOnAppStop
protected boolean handleExitHook
protected java.lang.String exitDialogTitle
protected java.lang.String exitDialogMessage
protected boolean screenFullScreen
protected boolean screenShowTitle
protected int splashPicID
protected int screenOrientation
protected OGLESContext ctx
protected android.opengl.GLSurfaceView view
protected boolean isGLThreadPaused
protected android.widget.ImageView splashImageView
protected android.widget.FrameLayout frameLayout
Constructor Detail |
---|
public AndroidHarness()
Method Detail |
---|
public java.lang.Object onRetainNonConfigurationInstance()
onRetainNonConfigurationInstance
in class android.app.Activity
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Activity
protected void onRestart()
onRestart
in class android.app.Activity
protected void onStart()
onStart
in class android.app.Activity
protected void onResume()
onResume
in class android.app.Activity
protected void onPause()
onPause
in class android.app.Activity
protected void onStop()
onStop
in class android.app.Activity
protected void onDestroy()
onDestroy
in class android.app.Activity
public Application getJmeApplication()
public void handleError(java.lang.String errorMsg, java.lang.Throwable t)
handleError
in interface SystemListener
errorMsg
- The error message, if any, or null.t
- Throwable object, or null.public void onClick(android.content.DialogInterface dialog, int whichButton)
onClick
in interface android.content.DialogInterface.OnClickListener
dialog
- whichButton
- public void onTouch(java.lang.String name, TouchEvent evt, float tpf)
onTouch
in interface TouchListener
name
- the name of the eventevt
- the touch eventtpf
- how much time has passed since the last framepublic void layoutDisplay()
public void removeSplashScreen()
public void initialize()
SystemListener
initialize
in interface SystemListener
public void reshape(int width, int height)
SystemListener
reshape
in interface SystemListener
public void update()
SystemListener
update
in interface SystemListener
public void requestClose(boolean esc)
SystemListener
requestClose
in interface SystemListener
esc
- If true, the user pressed ESC to close the application.public void destroy()
SystemListener
destroy
in interface SystemListener
public void gainFocus()
SystemListener
gainFocus
in interface SystemListener
public void loseFocus()
SystemListener
loseFocus
in interface SystemListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |