If game server is more than one, ensure to set the picked one on Hive. If the user needs to select a game server, implement the server selection UI before exposing the Server Maintenance popup, and change the Hive setting by calling setServerId()
method in the Configuration class.
After the game server is set up, you can expose the server maintenance popups at any time in the game. You can set the popup through Hive One menu and it blocks game access while under maintenance. Displaying popups are available to use the UI provided by Hive SDK or customize it based on the information from Hive.
Setting Popup Contents
Set the details of server maintenance, forced update and notice on Hive One. For more information about settings, see Notice Registration Guide.
Displaying Popup
Hive displays maintenance/forced update/notice popups or returns the popup content for customizing composition. If Hive shows up the popups in Hive UI type; however, if you display popups, you can design them. Depending on whether you are using Hive popups, set the parameters as below and call checkMaintenance()
method in the Auth class.
- A use of Hive-providing popups: Set
isShow
parameter astrue
. - A request for popup data to provide custumized popups: Set
isShow
parameter asfalse
. For more information about popup data, see Popup Data Returned by Hive below.
Followings are sample codes to display maintenance or forced update popups with Hive-providing UI.
API Reference: hive.Auth.checkMaintenance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Use the Hive-providing popup. Boolean isShow = true; // Callback handler managing the result of popup display. public void onAuthMaintenanceCB(ResultAPI result, AuthMaintenanceInfo authMaintenanceInfo) { if(result.isSuccess()){ if(authMaintenanceInfo != null){ // Success in API call. }else{ // Nothing exists to display on the popup. } } } // Display the popup. hive.Auth.checkMaintenance(isShow, onAuthMaintenanceCB); |
API Reference: Auth::checkMaintenance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Use the Hive-providing popup. bool isShow = true; // Display the popup. Auth::checkMaintenance(isShow, [=](ResultAPI result, AuthMaintenanceInfo authMaintenanceInfo){ // Callback function managing the result of popup display. if(result.isSuccess()){ if(authMaintenanceInfo != null){ // Success in API call. }else{ // Nothing exists to display on the popup. } } }); |
API Reference: com.hive.Auth.checkMaintenance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Use the Hive-providing popup. boolean isShow = true; // Display the popup. com.hive.Auth.checkMaintenance(isShow, new com.hive.Auth.AuthMaintenanceListener() { // Callback listener managing the result of popup display. @Override public void onAuthMaintenance(ResultAPI result, AuthMaintenanceInfo authMaintenanceInfo) { if(result.isSuccess()){ if(authMaintenanceInfo != null) { // Success in API call. }else { // Nothing exists to display on the popup. } } } }); |
API Reference: HIVEAuth:checkMaintenance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Use the Hive-providing popup. BOOL isShow = YES; // Display the popup. [HIVEAuth checkMaintenance:isShow handler:^(HIVEResultAPI *resultApi, HIVEAuthMaintenanceInfo *maintenanceInfo) { // Callback handler managing the result of popup display. if(resultApi.isSuccess){ if(maintenanceInfo != nil){ // Success in API call. }else { // Nothing exists to display on the popup. } } }]; |
Popup Data Returned by Hive
If setting popup data on Hive One is requested through checkMaintenance()
method, Hive returns the values in the following table through AuthMaintenanceInfo
object. If Hive returns the object as null
, it means nothing exists to pop up.
Field Name | Description | Type |
title | Popup title | String |
message | Popup contents | String |
button | Text on the label of popup button | String |
action | Action type when a user taps the popup button
|
Enumeration type of AuthV4MaintenanceActionType |
url | URL displayed by external browser. This is valid when the value of action field is OPEN_URL |
String |
remainingTime | The value available to use as you want (Unit: second). | Integer |