Gamebase SDK for Unity 2.76.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

  configuration | The init settings of contact URL.
  callback | Callbacks 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.
}
});
}
Toast.Gamebase.Gamebase.Contact.OpenContact
static void OpenContact(GamebaseCallback.ErrorDelegate callback)
Open TOAST Contact WebView with CS URL which is wrote in TOAST Gamebase App Console.
Definition Gamebase.cs:3650
Toast.Gamebase.Gamebase.Contact
This class provides wrapping of function execution related to TOAST Contact.
Definition Gamebase.cs:3615
Toast.Gamebase.Gamebase.IsSuccess
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11