renewTransferAccount
open fun renewTransferAccount(configuration: TransferAccountRenewConfiguration, callback: GamebaseDataCallback<TransferAccountInfo>)
Try to renew the transfer account. If you want to renew the account automatically or manually, you should pass the proper TransferAccountRenewConfiguration object to the first parameter.
public static void onRenewTransferAccount(final Activity activity) {
final RenewalTargetType renewalTargetType = RenewalTargetType.ID_PASSWORD;
final TransferAccountRenewConfiguration autoConfig = TransferAccountRenewConfiguration.newAutoRenewConfiguration(renewalTargetType);
final TransferAccountRenewConfiguration manualConfig = TransferAccountRenewConfiguration.newManualRenewConfiguration("id", "password");
Gamebase.renewTransferAccount(autoConfig, new GamebaseDataCallback<TransferAccountInfo>() {
@Override
public void onCallback(final TransferAccountInfo transferAccountInfo, final GamebaseException exception) {
if (!Gamebase.isSuccess(exception)) {
// Renewing TransferAccount failed.
return;
}
// Renewing TransferAccount success.
final String renewedAccount = transferAccount.account.id;
final String renewedPassword = transferAccount.account.password;
}
});
}
Content copied to clipboard
Since
Added 2.1.0.
Parameters
configuration
callback
Callbacks the result of renewTransferAccount.