com.deploygate.sdk
Interface DeployGateCallback


public interface DeployGateCallback

A callback interface to receive DeployGate events. Implement this and pass to DeployGate.registerCallback(DeployGateCallback, boolean) to listen.

Author:
tnj

Method Summary
 void onInitialized(boolean isServiceAvailable)
          Callback to tell the finish of DeployGate service initialization procedure.
 void onStatusChanged(boolean isManaged, boolean isAuthorized, java.lang.String loginUsername, boolean isStopped)
          Callback to tell the app status on the DeployGate has changed.
 void onUpdateAvailable(int revision, java.lang.String versionName, int versionCode)
          Callback to tell the new version is available.
 

Method Detail

onInitialized

void onInitialized(boolean isServiceAvailable)
Callback to tell the finish of DeployGate service initialization procedure.

Parameters:
isServiceAvailable - true if DeployGate service is available on the device.

onStatusChanged

void onStatusChanged(boolean isManaged,
                     boolean isAuthorized,
                     java.lang.String loginUsername,
                     boolean isStopped)
Callback to tell the app status on the DeployGate has changed. This will also be called back just after onInitialized(boolean), DeployGate.refresh() and DeployGate.registerCallback(DeployGateCallback, boolean) with true in second argument.

Parameters:
isManaged - true if the app is known on DeployGate app
isAuthorized - true if the app is on current user's installed list
loginUsername - Current login username, returned only when isAuthorized is true.
isStopped - Reserved.

onUpdateAvailable

void onUpdateAvailable(int revision,
                       java.lang.String versionName,
                       int versionCode)
Callback to tell the new version is available.

Parameters:
revision - revision of new version
versionName - user-defined version name of new version
versionCode - user-defined version code of new version