VoltAir
|
Subclass of QtActivity to provide Android-specific functionality. More...
Public Member Functions | |
void | onCreate (Bundle savedInstanceState) |
Called when the activity is starting. More... | |
void | onStart () |
Called after onCreate() or onRestart() when the activity is being displayed to the user. More... | |
void | onResume () |
Called when the activity has returned to the foreground (although not necessarily having window focus) and is ready for user interaction. More... | |
void | onPause () |
Called when the activity is going into the background, but has not yet been killed. More... | |
void | onStop () |
Called when the activity is no longer visible to the user. More... | |
void | onDestroy () |
Called when the activity is finishing or being killed by the system. More... | |
void | onActivityResult (int requestCode, int responseCode, Intent data) |
Called when an activity launched by this activity exits. More... | |
void | onSignInFailed () |
Callback for GPGS sign-in failure. More... | |
void | onSignInSucceeded () |
Callback for GPGS sign-in success. More... | |
void | onStateConflict (AppStateManager.StateConflictResult result) |
Called when a conflict is detected while loading app state. More... | |
void | onStateLoaded (AppStateManager.StateLoadedResult result) |
Called when app state data has been loaded successfully. More... | |
boolean | dispatchGenericMotionEvent (MotionEvent event) |
Called to process (and possibly intercept) generic motion events. More... | |
boolean | dispatchKeyEvent (KeyEvent event) |
Called to process (and possibly intercept) key events. More... | |
void | onInputDeviceAdded (int deviceId) |
Called whenever an input device has been added to the system. More... | |
void | onInputDeviceChanged (int deviceId) |
Called whenever the properties of an input device have changed since they were last queried. More... | |
void | onInputDeviceRemoved (int deviceId) |
Called whenever an input device has been removed from the system. More... | |
int | getTouchScreenDeviceId () |
Returns the hardware deviceId of the touch screen input device, or -1 if none exists. More... | |
SoundManager | getSoundManager () |
Returns a reference to the Java-based SoundManager used for achieving gapless BGM playback. More... | |
boolean | isSignedIntoCloud () |
Returns true if currently signed into the cloud (i.e. GPGS). More... | |
boolean | cloudSignInFailed () |
Returns true if the most recent cloud (i.e. GPGS) sign-in attempt failed. More... | |
void | signIntoCloud () |
Begins asynchronous GPGS sign-in. More... | |
void | signOutOfCloud () |
Signs out of GPGS. More... | |
boolean | ensureCloudSync () |
Starts a GPGS AppStateManager save game data sync. More... | |
void | saveToCloud (String data) |
Saves data to the GPGS AppStateManager . More... | |
void | clearCloudData () |
Resets AppStateManager save game data. More... | |
boolean | revealAchievement (final String name) |
Reveals a GPGS achievement. More... | |
boolean | unlockAchievement (final String name) |
Unlocks a GPGS achievement. More... | |
boolean | incrementAchievement (String name, int numSteps) |
Increments a GPGS incremental achievement. More... | |
boolean | setAchievementSteps (String name, int minSteps) |
Sets a GPGS incremental achievement to have a minimum number of steps. More... | |
void | showAchievementsRequested () |
Launch an Intent to show the GPGS achievements activity screen. More... | |
void | resetAchievementsRequested () |
Resets all GPGS achievement progress for the currently signed in user account. More... | |
String | getVersionName () |
Returns the version string of the Android application. More... | |
void | setTrackerScreenName (String screenName, boolean sendScreenView) |
Sets the Google Analytics screen name and optionally sends a screen view hit. More... | |
void | sendTrackerEvent (String category, String action) |
Sends an event hit to Google Analytics. More... | |
void | sendTrackerEvent (String category, String action, String label) |
Sends an event hit to Google Analytics. More... | |
void | sendTrackerEvent (String category, String action, String label, long value) |
Sends an event hit to Google Analytics. More... | |
void | sendTrackerEvent (String category, String action, long value) |
Sends an event hit to Google Analytics. More... | |
native void | onApplicationCreate () |
Native callback for onCreate() lifecycle event. More... | |
native void | onApplicationStart () |
Native callback for onStart() lifecycle event. More... | |
native void | onApplicationResume () |
Native callback for onResume() lifecycle event. More... | |
native void | onApplicationPause () |
Native callback for onPause() lifecycle event. More... | |
native void | onApplicationStop () |
Native callback for onStop() lifecycle event. More... | |
native void | onApplicationDestroy () |
Native callback for onDestroy() lifecycle event. More... | |
native void | onControllerDisconnect (int deviceId) |
Native callback for onInputDeviceRemoved(). More... | |
native boolean | onGamepadMotionEvent (MotionEvent e) |
Native callback for dispatchGenericMotionEvent() of gamepad related MotionEvents . More... | |
native boolean | onTouchNavigationMotionEvent (MotionEvent e) |
Native callback for dispatchGenericMotionEvent() of touch navigation related MotionEvents . More... | |
native boolean | onGamepadKeyEvent (KeyEvent e) |
Native callback for dispatchKeyEvent() of gamepad related KeyEvents . More... | |
native boolean | onTouchNavigationKeyEvent (KeyEvent e) |
Native callback for dispatchKeyEvent() of touch navigation related KeyEvents . More... | |
native boolean | onKeyboardKeyEvent (KeyEvent e) |
Native callback for dispatchKeyEvent() of keyboard related KeyEvents . More... | |
native void | onSignedIntoCloudChanged (boolean signedIntoCloud) |
Native callback for onSignInSucceeded() and onSignInFailed(). More... | |
native void | onCloudDataLoaded (int statusCode, String data) |
Native callback for onStateLoaded(). More... | |
native String | onCloudDataConflict (String localData, String serverData) |
Native callback for onStateConflict(). More... | |
Subclass of QtActivity to provide Android-specific functionality.
This class is responsible for:
InputEvents
|
inline |
Resets AppStateManager
save game data.
|
inline |
Returns true
if the most recent cloud (i.e. GPGS) sign-in attempt failed.
|
inline |
Called to process (and possibly intercept) generic motion events.
event | Generic MotionEvent to handle |
true
if event
was handled
|
inline |
Called to process (and possibly intercept) key events.
event | KeyEvent to handle |
true
if event
was handled
|
inline |
Starts a GPGS AppStateManager
save game data sync.
false
. true
if a cloud sync has been started successfully
|
inline |
Returns a reference to the Java-based SoundManager used for achieving gapless BGM playback.
|
inline |
Returns the hardware deviceId of the touch screen input device, or -1 if none exists.
|
inline |
Returns the version string of the Android application.
|
inline |
Increments a GPGS incremental achievement.
name | Android resource name used to locate the achievement id |
numSteps | Number of steps to increment the achievement |
true
if the achievement was successfully incremented
|
inline |
Returns true
if currently signed into the cloud (i.e. GPGS).
|
inline |
Called when an activity launched by this activity exits.
requestCode | Identifier supplied when the activity was originally launched |
responseCode | Status returned by the activity |
data | Intent which can be used to return result data to the caller |
native void com.google.fpl.voltair.VoltAirActivity.onApplicationCreate | ( | ) |
Native callback for onCreate() lifecycle event.
native void com.google.fpl.voltair.VoltAirActivity.onApplicationDestroy | ( | ) |
Native callback for onDestroy() lifecycle event.
native void com.google.fpl.voltair.VoltAirActivity.onApplicationPause | ( | ) |
Native callback for onPause() lifecycle event.
native void com.google.fpl.voltair.VoltAirActivity.onApplicationResume | ( | ) |
Native callback for onResume() lifecycle event.
native void com.google.fpl.voltair.VoltAirActivity.onApplicationStart | ( | ) |
Native callback for onStart() lifecycle event.
native void com.google.fpl.voltair.VoltAirActivity.onApplicationStop | ( | ) |
Native callback for onStop() lifecycle event.
native String com.google.fpl.voltair.VoltAirActivity.onCloudDataConflict | ( | String | localData, |
String | serverData | ||
) |
Native callback for onStateConflict().
localData | String encoded local save game data that is in conflict |
serverData | String encoded cloud save game data that is in conflict |
native void com.google.fpl.voltair.VoltAirActivity.onCloudDataLoaded | ( | int | statusCode, |
String | data | ||
) |
Native callback for onStateLoaded().
statusCode | Status code indicating load result and possible errors |
data | String encoded loaded save game data or null if loading error occurred |
native void com.google.fpl.voltair.VoltAirActivity.onControllerDisconnect | ( | int | deviceId | ) |
Native callback for onInputDeviceRemoved().
|
inline |
Called when the activity is starting.
Initializes services for BGM, GPGS, and GA.
savedInstanceState | Bundle that contains the data that was most recently supplied by the activity through onSaveInstanceState() |
|
inline |
Called when the activity is finishing or being killed by the system.
native boolean com.google.fpl.voltair.VoltAirActivity.onGamepadKeyEvent | ( | KeyEvent | e | ) |
Native callback for dispatchKeyEvent() of gamepad related KeyEvents
.
native boolean com.google.fpl.voltair.VoltAirActivity.onGamepadMotionEvent | ( | MotionEvent | e | ) |
Native callback for dispatchGenericMotionEvent() of gamepad related MotionEvents
.
|
inline |
Called whenever an input device has been added to the system.
deviceId | Id of the input device that was added |
|
inline |
Called whenever the properties of an input device have changed since they were last queried.
deviceId | Id of the input device that has changed |
|
inline |
Called whenever an input device has been removed from the system.
deviceId | Id of the input device that was removed |
native boolean com.google.fpl.voltair.VoltAirActivity.onKeyboardKeyEvent | ( | KeyEvent | e | ) |
Native callback for dispatchKeyEvent() of keyboard related KeyEvents
.
|
inline |
Called when the activity is going into the background, but has not yet been killed.
|
inline |
Called when the activity has returned to the foreground (although not necessarily having window focus) and is ready for user interaction.
native void com.google.fpl.voltair.VoltAirActivity.onSignedIntoCloudChanged | ( | boolean | signedIntoCloud | ) |
Native callback for onSignInSucceeded() and onSignInFailed().
signedIntoCloud | true if notifying of sign-in success |
|
inline |
Callback for GPGS sign-in failure.
Implements com.google.fpl.utils.GooglePlayServicesHelper.SignInListener.
|
inline |
Callback for GPGS sign-in success.
Implements com.google.fpl.utils.GooglePlayServicesHelper.SignInListener.
|
inline |
Called after onCreate() or onRestart()
when the activity is being displayed to the user.
|
inline |
Called when a conflict is detected while loading app state.
result | Result retrieved from AppStateManager.StateResult with the conflicting data |
|
inline |
Called when app state data has been loaded successfully.
result | Result retrieved from AppStateManager.StateResult with the loaded data |
|
inline |
Called when the activity is no longer visible to the user.
native boolean com.google.fpl.voltair.VoltAirActivity.onTouchNavigationKeyEvent | ( | KeyEvent | e | ) |
Native callback for dispatchKeyEvent() of touch navigation related KeyEvents
.
native boolean com.google.fpl.voltair.VoltAirActivity.onTouchNavigationMotionEvent | ( | MotionEvent | e | ) |
Native callback for dispatchGenericMotionEvent() of touch navigation related MotionEvents
.
|
inline |
Resets all GPGS achievement progress for the currently signed in user account.
|
inline |
Reveals a GPGS achievement.
If currently offline, this method will reveal the achievement with an Android Toast
instead of the GPGS' achievement notification.
name | Android resource name used to locate the achievement id |
true
if the achievement was successfully revealed
|
inline |
Saves data
to the GPGS AppStateManager
.
data | String encoded save game data to save |
|
inline |
Sends an event hit to Google Analytics.
category | Category in which the event will be filed |
action | Action associated with the event |
|
inline |
Sends an event hit to Google Analytics.
category | Category in which the event will be filed |
action | Action associated with the event |
label | Descriptive label used for further differentiation of categorical actions |
|
inline |
Sends an event hit to Google Analytics.
category | Category in which the event will be filed |
action | Action associated with the event |
label | Descriptive label used for further differentiation of categorical actions |
value | Value to be logged with the event |
|
inline |
Sends an event hit to Google Analytics.
category | Category in which the event will be filed |
action | Action associated with the event |
value | Value to be logged with the event |
|
inline |
Sets a GPGS incremental achievement to have a minimum number of steps.
name | Android resource name used to locate the achievement id |
minSteps | Lower bound for incremental progress |
true
if the achievement was successfully set to minSteps
|
inline |
Sets the Google Analytics screen name and optionally sends a screen view hit.
screenName | Name of screen to be set |
sendScreenView | true if a screen view hit should be sent |
|
inline |
Launch an Intent
to show the GPGS achievements activity screen.
|
inline |
Begins asynchronous GPGS sign-in.
|
inline |
Signs out of GPGS.
|
inline |
Unlocks a GPGS achievement.
If currently offline, this method will unlock the achievement with an Android Toast
instead of the GPGS' achievement notification.
name | Android resource name used to locate the achievement id |
true
if the achievement was successfully unlocked