Gamebase SDK for Android  1.3.0
Toast Gamebase Platform

◆ addMapping() [3/3]

static void addMapping ( @NonNull final Activity  activity,
final String  providerName,
@Nullable final Map< String, Object >  additionalInfo,
@Nullable final GamebaseDataCallback< AuthToken >  callback 
)
static

Mapping the currently authenticated user identifier of Gamebase with another external authentication.

Parameters
activityThe activity which is starting the mapping process.
providerNameThe providerName which is authentication provider.
additionalInfoThe additionalInfo which is additional information using for mapping.
callbackCallbacks the results of mappings,
returns the authentication token as a result of mappings.

Example Usage:

TAPSDK.addMapping(activity, AuthProvider.GOOGLE, null, new TAPDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken data, TAPException exception) {
if (TAPSDK.isSuccess(exception)) {
Log.d(TAG, "Add mapping successful");
...
} else {
Log.e(TAG, "Add mapping failed");
...
}
}
});
See also
com.toast.android.gamebase.base.auth.AuthProvider
com.toast.android.gamebase.GamebaseDataCallback
com.toast.android.gamebase.base.GamebaseException
com.toast.android.gamebase.base.GamebaseError