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 AuthV4 class.
Followings are sample codes to request adult verification to users.
Unity®
API Reference: hive.AuthV4.showAdultConfirm
1 2 3 4 5 6 7 |
using hive; AuthV4.showAdultConfirm((ResultAPI result) => { if (result.isSuccess()) { // API call successful } }); |
C++
API Reference: AuthV4::showAdultConfirm
1 2 3 4 5 6 7 8 9 10 |
#include <HIVE_SDK_Plugin/HIVE_CPP.h> using namespace std; using namespace hive; AuthV4::showAdultConfirm([=](ResultAPI result) { if (result.isSuccess()) { // API call successful } } ); |
Kotlin
API Reference: AuthV4.showAdultConfirm
1 2 3 4 5 6 7 8 9 10 |
import com.hive.AuthV4 import com.hive.ResultAPI AuthV4.showAdultConfirm(object : AuthV4.AuthV4AdultConfirmListener { override fun onAuthV4AdultConfirm(result: ResultAPI) { if (result.isSuccess) { // API call successful } } }) |
Java
API Reference: AuthV4.INSTANCE.showAdultConfirm
1 2 3 4 5 6 7 8 |
import com.hive.AuthV4; import com.hive.ResultAPI; AuthV4.INSTANCE.showAdultConfirm(result -> { if (result.isSuccess()) { // API call successful } }); |
Swift
API Reference: AuthV4Interface.showAdultConfirm
1 2 3 4 5 6 7 |
import HIVEService AuthV4Interface.showAdultConfirm() { result in if result.isSuccess() { // API call successful } } |
Objective-C
API Reference: HIVEAuthV4:showAdultConfirm
1 2 3 4 5 6 7 |
#import <HIVEService/HIVEService-Swift.h> [HIVEAuthV4 showAdultConfirm: ^(HIVEResultAPI *result) { if ([result isSuccess]) { // API call successful } }]; |