initialize

open fun initialize(@NonNull context: Context, @NonNull configuration: LoggerConfiguration)

Initialize NHN Cloud logger SDK NHN Cloud logger SDK sends a log to Log &Crash Server for analyzing the data.

If you define meta-data in AndroidManifest.xml, you don't need to call this API.

<meta-data android:name="gamebase_toast_logger_app_key" android:value="YOUR_LOG_AND_CRASH_APP_KEY"/>
<meta-data android:name="gamebase_toast_logger_enable_crash_reporter" android:value="true or false"/>
Or you can add string resource like this.
<string name="gamebase_toast_logger_app_key">YOUR_LOG_AND_CRASH_APP_KEY</string>
<string name="gamebase_toast_logger_enable_crash_reporter">true or false</string>

Since

Added 2.6.0.

Parameters

context

The context to use. Usually your android.app.Applicationor android.app.Activity object.

configuration

The appKey of the Log &Crash project must be set in this parameter.


open fun initialize(@NonNull context: Context, @NonNull callback: GamebaseCallback)

Deprecated

Initialize NHN Cloud logger SDK with the key value defined in string resource.

NHN Cloud logger SDK sends a log to Log &Crash Server for analyzing the data. The appKey of the Log &Crash project is required to initialize NHN Cloud logger SDK. This function gets the appKey from the string resource 'gamebase_toast_logger_app_key'.

You must include the resource file defined in the apk as shown below.

Required : <string name="gamebase_toast_logger_app_key">YOUR_LOG_AND_CRASH_APP_KEY</string>
Optional : <string name="gamebase_toast_logger_enable_crash_reporter">true or false</string>

Since

Added 2.6.0.

Deprecated

As of release 2.9.0, Instead of calling this function, include a string resource of key 'gamebase_toast_logger_app_key' in your build.

Parameters

context

The context to use. Usually your android.app.Applicationor android.app.Activity object.

callback

Initialization result callback, returns the result of initialization.