Gamebase SDK for Unity 2.69.0
Toast Gamebase Platform
Loading...
Searching...
No Matches

◆ OpenContact() [2/2]

static void OpenContact ( GamebaseRequest::Contact::Configuration configuration,
GamebaseCallback::ErrorDelegate callback )
static

Open TOAST Contact WebView with CS URL which is wrote in TOAST Gamebase App Console.

If the CS URL is empty or invalid, you will receive a GamebaseError.

Since
Added 2.16.0.
Parameters
configurationThe init settings of contact URL.
callbackCallbacks the result of OpenContact.

Example Usage :

public void SampleOpenContact()
{
var configuration = new GamebaseRequest.Contact.Configuration()
{
userName = "User Name"
};
Gamebase.Contact.OpenContact(configuration, (error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
// A user close the contact web view.
}
else if (error.code == GamebaseErrorCode.UI_CONTACT_FAIL_INVALID_URL)
{
// Gamebase Console Service Center URL is invalid.
// Please check the url field in the TOAST Gamebase Console.
}
else if (error.code == GamebaseErrorCode.UI_CONTACT_FAIL_ANDROID_DUPLICATED_VIEW)
{
// The customer center web view is already opened.
}
else
{
// An error occur when opening the contact web view.
}
});
}
static void OpenContact(GamebaseCallback.ErrorDelegate callback)
Open TOAST Contact WebView with CS URL which is wrote in TOAST Gamebase App Console.
Definition Gamebase.cs:3519
This class provides wrapping of function execution related to TOAST Contact.
Definition Gamebase.cs:3484
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11