Gamebase SDK for Android  1.3.0
Toast Gamebase Platform

◆ initialize()

static void initialize ( final Activity  activity,
final GamebaseConfiguration  configuration,
@Nullable final GamebaseDataCallback< LaunchingInfo callback 
)
static

This function initializes the Gamebase SDK.

If this function is not called, the Gamebase SDK function will not work.

Parameters
activityThe activity which is initializing modules
configurationThe configurations required to run the Gamebase SDK
callbackInitialization result callback,
returns the launching information as a result of initialization

Example Usage:

public class SampleActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample);
TAPSDK.setDebugMode(true);
TAPConfiguration configuration = new TAPConfiguration.Builder()
.setAppId("diIofWef")
.setAppVersion("1.0.0")
.setZoneType(ZoneType.REAL)
.build();
TAPSDK.initialize(activity, configuration, new TAPDataCallback<LaunchingInfo>() {
@Override
public void onCallback(LaunchingInfo data, TAPException exception) {
if (TAPSDK.isSuccess(exception)) {
// Success
...
} else {
// Failed
...
}
}
});
}
...
}
See also
com.toast.android.gamebase.GamebaseConfiguration
com.toast.android.gamebase.launching.data.LaunchingInfo
com.toast.android.gamebase.GamebaseDataCallback
com.toast.android.gamebase.base.GamebaseException
com.toast.android.gamebase.base.GamebaseError