Result API Push
Book Mark
| getRemotePush | setRemotePush | registerLocalPush | unregisterLocalPush | setForegroundPush |
|---|---|---|---|---|
| getForegroundPush |
Push.getRemotePush¶
Push.getRemotePush ((ResultAPI result, RemotePush remotePush)=>{
switch(result.code) {
case ResultAPI.Code.PushNetworkError:
// Please check the network connection status of the device. If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case ResultAPI.Code.PushInvalidResponseData:
// Please contact HIVE with the received message.
break;
case ResultAPI.Code.PushServerResponseError:
// Please contact HIVE with the received message.
break;
}
});
Push.getRemotePush(new RemotePushListener() {
@Override
public void onPushToken(ResultAPI result, RemotePush remotePush) {
switch(result.code) {
case PushNetworkError:
// Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case PushInvalidResponseData:
// Contact HIVE with the received message.
break;
case PushServerResponseError:
// Contact HIVE with the received message.
break;
}
}
});
[HIVEPush getRemotePush:^(HIVEResultAPI *result, HIVERemotePush* remotePush) {
switch (result.code) {
case kPushNetworkError:
// Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case kPushInvalidResponseData:
// Contact HIVE with the received message.
break;
case kPushServerResponseError:
// Contact HIVE with the received message.
break;
default:
break;
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required Implementation) PushNetworkError | Communication with the HIVE server has failed. Removed in HIVE SDK v4.13.0 | Please check the network connection status of the device. If this error occurs despite the network connection being normal, please contact HIVE with the error message. |
| (Required Implementation) PushInvalidResponseData | Data that does not conform to the HIVE server communication protocol has been received. Removed in HIVE SDK v4.13.0 | Please contact HIVE with the received message. |
| (Required Implementation) PushServerResponseError | The response from the HIVE server is not normal. Removed in HIVE SDK v4.13.0 | Please contact HIVE with the received message. |
| PushNotInitialized | The HIVE SDK has not been initialized. | Please call the AuthV4.setup API to initialize the HIVE SDK. View API |
| PushAgeGateUnder13 | This is delivered when a user under the age of 13 performs an API that is not available to them. This is only delivered in games that comply with COPPA (Children's Online Privacy Protection Act) laws. | Implement it so that there are no issues with game progression even if a user under 13 calls this API without taking any action in the game. |
Push.setRemotePush¶
RemotePush remotePush = new RemotePush();
remotePush.isAgreeNotice = true;
remotePush.isAgreeNight = true;
Push.setRemotePush (remotePush, (ResultAPI result, RemotePush remotePush)=>{
switch(result.code) {
case ResultAPI.Code.PushNetworkError:
// Please check the network connection status of the device. If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case ResultAPI.Code.PushInvalidResponseData:
// Please contact HIVE with the message received.
break;
case ResultAPI.Code.PushServerResponseError:
// Please contact HIVE with the message received.
break;
}
});
RemotePush remotePush;
remotePush.isAgreeNotice = true;
remotePush.isAgreeNight = true;
Push::setRemotePush(remotePush,[](ResultAPI const & result, RemotePush remotePush){
switch (result.code) {
case ResultAPI::Code::PushNetworkError:
// Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case ResultAPI::Code::PushInvalidResponseData:
// Contact HIVE with the received message.
break;
case ResultAPI::Code::PushServerResponseError:
// Contact HIVE with the received message.
break;
}
});
RemotePush remotePush = new RemotePush();
remotePush.isAgreeNotice = true;
remotePush.isAgreeNight = true;
Push.setRemotePush(remotePush, new RemotePushListener() {
@Override
public void onPushToken(ResultAPI result, RemotePush remotePush) {
switch (result.code) {
case PushNetworkError:
// Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case PushInvalidResponseData:
// Contact HIVE with the received message.
break;
case PushServerResponseError:
// Contact HIVE with the received message.
break;
default:
break;
}
}
});
HIVERemotePush* remotePushSetting = [HIVERemotePush remotePushWithNotice:YES night:NO];
[HIVEPush setRemotePush:remotePushSetting handler:^(HIVEResultAPI *result, HIVERemotePush* remotePush) {
switch (result.code) {
case kPushNetworkError:
// Please check the network connection status of the device. If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case kPushInvalidResponseData:
// Please contact HIVE with the received message.
break;
case kPushServerResponseError:
// Please contact HIVE with the received message.
break;
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) PushNetworkError | Failed to communicate with the HIVE server. Removed in HIVE SDK v4.13.0 | Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message. |
| (Required implementation) PushInvalidResponseData | Data that does not comply with the HIVE server communication protocol was delivered. Removed in HIVE SDK v4.13.0 | Contact HIVE with the received message. |
| (Required implementation) PushServerResponseError | The HIVE server communication response value is invalid. Removed in HIVE SDK v4.13.0 | Contact HIVE with the received message. |
| PushNotInitialized | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| PushInvalidParamRemotePush | The data passed when calling the API is invalid. | Check whether any parameters are missing. |
| PushAgeGateUnder13 | This is delivered when an API that users under 13 cannot use is called by a user who is a child under 13. It is delivered only for games that comply with the COPPA (Children's Online Privacy Protection Act) law. | If a user under 13 calls this API, implement the game so that gameplay is not affected even if no action is taken in the game. |
Push.registerLocalPush¶
| Code | Message | How to solve |
|---|---|---|
| PushAgeGateUnder13 | This is delivered when an API that users under 13 cannot use is called by a user who is a child under 13. It is delivered only for games that comply with the COPPA (Children's Online Privacy Protection Act) law. | If a user under 13 calls this API, implement the game so that gameplay is not affected even if no action is taken in the game. |
| PushInvalidParamLocalPush | The data passed when calling the API is invalid. | Check whether any parameters are missing. |
Push.unregisterLocalPush¶
| Code | Message | How to solve |
|---|---|---|
| No Result API |
Push.setForegroundPush¶
| Code | Message | How to solve |
|---|---|---|
| PushAgeGateUnder13 | If a user under 13 attempts to use an API that is not allowed, it will be passed on if the user is a child under 13. This is only passed in games that comply with the COPPA (Children's Online Privacy Protection Act) law. | Implement it so that there are no issues with game progression even if the user under 13 calls the API without any action in the game. |
| PushNotInitialized | The HIVE SDK is not initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
Push.getForegroundPush¶
| Code | Message | How to solve |
|---|---|---|
| PushAgeGateUnder13 | If a user under 13 attempts to use an API that is not allowed for them, this will be passed on if the user is a child under 13. This is only passed on in games that comply with COPPA (Children's Online Privacy Protection Act). | Implement it so that there are no issues with game progress even if the user under 13 calls this API without any action in the game. |
| PushNotInitialized | The HIVE SDK is not initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |