openContact
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 GamebaseException.
Example Usage:
Gamebase.Contact.openContact(activity, new GamebaseCallback() {
@Override
public void onCallback(GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
// The user closed the contact web view.
} else if (exception.getCode() == GamebaseError.UI_CONTACT_FAIL_INVALID_URL) {
// Please check the customer URL field in the TOAST Gamebase Console.
} else {
// Error occur when opening the contact web view.
}
}
});
Content copied to clipboard
Since
Added 2.5.0.
Parameters
activity
Current activity.
onCloseCallback
called when the browser closed.
See also
open fun openContact(@NonNull activity: Activity, @NonNull configuration: ContactConfiguration, @Nullable onCloseCallback: GamebaseCallback)
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 GamebaseException.
Example Usage:
ContactConfiguration configuration = ContactConfiguration.newBuilder()
.setUserName(userName)
.build();
Gamebase.Contact.openContact(activity, configuration, new GamebaseCallback() {
@Override
public void onCallback(GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
// The user closed the contact web view.
} else if (exception.getCode() == GamebaseError.UI_CONTACT_FAIL_INVALID_URL) {
// Please check the customer URL field in the TOAST Gamebase Console.
} else {
// Error occur when opening the contact web view.
}
}
});
Content copied to clipboard
Since
Added 2.16.0.
Parameters
activity
Current activity.
configuration
The init settings of contact URL.
onCloseCallback
called when the browser closed.