If your game needs verification of user age, utilize adult verification feature, one of HIVE functions. User data is required to prove adult, so ensure to authenticate users right after sign-in.
For adult verification, implement showAdultConfirm()
method in the Auth class.
Followings are sample codes to request adult verification to users.
Unity®
API Reference: hive.Auth.showAdultConfirm
1 2 3 4 5 6 7 8 9 |
// Callback handler managing the result of adult verification. public void onAuthAdultConfirmCB(ResultAPI result) { if(result.isSuccess()){ // Success in API call. } } // Request for adult verification. hive.Auth.showAdultConfirm(onAuthAdultConfirmCB); |
C++
API Reference: Auth::showAdultConfirm
1 2 3 4 5 6 7 8 |
// Request for adult verification. Auth::showAdultConfirm([=](ResultAPI result){ // Callback function managing the result of adult verification. if(result.isSuccess()){ // Success in API call. } } ); |
Android
API Reference: com.hive.Auth.showAdultConfirm
1 2 3 4 5 6 7 8 9 10 |
// Request for adult verification. Auth.showAdultConfirm(new Auth.AuthAdultConfirmListener() { // Callback listener managing the result of adult verification @Override public void onAuthAdultConfirm(ResultAPI result) { if(result.isSuccess()){ // Success in API call. } } }); |
iOS
API Reference: HIVEAuth:showAdultConfirm
1 2 3 4 5 6 7 |
// Request for adult verification. [HIVEAuth showAdultConfirm:^(HIVEResultAPI *result) { // Callback handler managing the result of adult verification. if(result.isSuccess){ // Success in API call. } }]; |