ข้ามไปที่เนื้อหา

Result API ProviderGoogle

Book Mark

achievementsReveal achievementsUnlock achievementsIncrement showAchievements leaderboardsSubmitScore
showLeaderboards

ProviderGoogle.achievementsReveal

ProviderGoogle.achievementsReveal("achievementId", (ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call succeeded
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailAchievementsReveal:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.achievementsReveal("achievementId", [=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call succeeded
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailAchievementsReveal:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.achievementsReveal("achievementId", new ProviderGoogle.GoogleAchievementsListener() {
    @Override
    public void onAchievementsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call succeeded
            break;
            case AuthV4GoogleResponseFailAchievementsReveal:
            //  API call failed
            //  Contact HIVE with the corresponding error code.
            break;
            case AuthV4GoogleNeedSignIn:
            //  Not signed in to Google
            //  Check the Google sign-in status
            break;
        }
    }
});
// Not supported
Code Message How to solve
AuthV4GoogleResponseFailAchievementsReveal An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
AuthV4GoogleNeedSignIn The device is not signed in to PGS. If necessary, guide the user to sign in to PGS on the device.

ProviderGoogle.achievementsUnlock

ProviderGoogle.achievementsUnlock("achievementId", (ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call succeeded
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailAchievementsUnlock:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.achievementsUnlock("achievementId", [=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call succeeded
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailAchievementsUnlock:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.achievementsUnlock("achievementId", new ProviderGoogle.GoogleAchievementsListener() {
    @Override
    public void onAchievementsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call successful
            break;
            case AuthV4GoogleResponseFailAchievementsUnlock:
            //  API call failed
            //  Please contact HIVE with the corresponding error code
            break;
            case AuthV4GoogleNeedSignIn:
            //  Google login is not done
            //  Please check the Google login status
            break;
        }
    }
});
// Not supported
Code Message How to solve
AuthV4GoogleResponseFailAchievementsUnlock An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
AuthV4GoogleNeedSignIn The device is not signed in to PGS. If necessary, guide the user to sign in to PGS on the device.

ProviderGoogle.achievementsIncrement

ProviderGoogle.achievementsIncrement("achievementId", value, (ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call successful
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailAchievementsIncrement:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Google login is not done
        //  Please check the Google login status
        break;
    }
});
ProviderGoogle.achievementsIncrement("achievementId", value, [=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call succeeded
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailAchievementsIncrement:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.achievementsIncrement("achievementId", value, new ProviderGoogle.GoogleAchievementsListener() {
    @Override
    public void onAchievementsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call successful
            break;
            case AuthV4GoogleResponseFailAchievementsIncrement:
            //  API call failed
            //  Please contact HIVE with the corresponding error code
            break;
            case AuthV4GoogleNeedSignIn:
            //  Google sign-in is not done
            //  Please check the Google sign-in status
            break;
        }
    }
});
// Not supported
Code Message How to solve
AuthV4GoogleResponseFailAchievementsIncrement An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
AuthV4GoogleNeedSignIn The device is not signed in to PGS. If necessary, guide the user to sign in to PGS on the device.

ProviderGoogle.showAchievements

ProviderGoogle.showAchievements((ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call succeeded
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailShowAchievements:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Google login is not performed
        //  Please check the Google login status
        break;
        case ResultAPI.Code.AuthV4GoogleLogout:
        //  Logged out of Google account from achievements window. Implement game account logout according to internal policy.
        //  (No solution available)
        break;
    }
});
ProviderGoogle.showAchievements([=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call successful
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailShowAchievements:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Google login is not done
        //  Please check your Google login status
        break;
        case hive::ResultAPI::AuthV4GoogleLogout:
        //  Logged out of Google account from achievements window. Implement game account logout according to internal policy.
        //  (No solution available)
        break;
    }
});
ProviderGoogle.showAchievements(new ProviderGoogle.GoogleAchievementsListener() {
    @Override
    public void onAchievementsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call successful
            break;
            case AuthV4GoogleResponseFailShowAchievements:
            //  API call failed
            //  Please contact HIVE with the error code
            break;
            case AuthV4GoogleNeedSignIn:
            //  Google login is not done
            //  Please check your Google login status
            break;
            case AuthV4GoogleLogout:
            //  Logged out of Google account from achievements window. Implement game account logout according to internal policy.
            //  (No solution available)
            break;
        }
    }
});
// Not supported
Code Message How to solve
(Required implementation) AuthV4GoogleNeedSignIn The device is not signed in to PGS. Guide the user to sign in to PGS on the device.
(Required implementation) AuthV4GoogleLogout The user signed out of the Google account in the achievements window. Implement game account sign-out according to your internal policy.
AuthV4GoogleResponseFailShowAchievements An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.

ProviderGoogle.leaderboardsSubmitScore

ProviderGoogle.leaderboardsSubmitScore("leaderboardId", score, (ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call succeeded
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailLeaderboardsSubmitScore:
        //  API call failed
        //  Contact HIVE with the corresponding error code.
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Not signed in to Google
        //  Check the Google sign-in status
        break;
    }
});
ProviderGoogle.leaderboardsSubmitScore("leaderboardId", score, [=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call succeeded
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailLeaderboardsSubmitScore:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Google login not performed
        //  Please check your Google login status
        break;
    }
});
ProviderGoogle.leaderboardsSubmitScore("leaderboardId", score, new ProviderGoogle.GoogleLeaderboardsListener() {
    @Override
    public void onLeaderboardsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call succeeded
            break;
            case AuthV4GoogleResponseFailLeaderboardsSubmitScore:
            //  API call failed
            //  Contact HIVE with the corresponding error code.
            break;
            case AuthV4GoogleNeedSignIn:
            //  Not signed in to Google
            //  Check the Google sign-in status
            break;
        }
    }
});
// Not supported
Code Message How to solve
AuthV4GoogleResponseFailLeaderboardsSubmitScore An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
AuthV4GoogleNeedSignIn The device is not signed in to PGS. If necessary, guide the user to sign in to PGS on the device.

ProviderGoogle.showLeaderboards

ProviderGoogle.showLeaderboards((ResultAPI result)=>{

    switch(result.code){
        case ResultAPI.Code.Success:
        //  API call successful
        break;
        case ResultAPI.Code.AuthV4GoogleResponseFailShowLeaderboards:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case ResultAPI.Code.AuthV4GoogleNeedSignIn:
        //  Google login is not done
        //  Please check the Google login status
        break;
        case ResultAPI.Code.AuthV4GoogleLogout:
        //  Logged out of Google account from the leaderboard window. Implement game account logout according to internal policy.
        //  (No solution available)
        break;
    }
});
ProviderGoogle.showLeaderboards([=](ResultAPI const & result) {

    switch(result.code){
        case hive::ResultAPI::Success:
        //  API call successful
        break;
        case hive::ResultAPI::AuthV4GoogleResponseFailShowLeaderboards:
        //  API call failed
        //  Please contact HIVE with the corresponding error code
        break;
        case hive::ResultAPI::AuthV4GoogleNeedSignIn:
        //  Google login is not performed
        //  Please check your Google login status
        break;
        case hive::ResultAPI::AuthV4GoogleLogout:
        //  Logged out of Google account from the leaderboard window. Implement game account logout according to internal policy.
        //  (No solution available)
        break;
    }
});
ProviderGoogle.showLeaderboards(new ProviderGoogle.GoogleLeaderboardsListener() {
    @Override
    public void onLeaderboardsResult(ResultAPI resultAPI) {

        switch (resultAPI.code){
            case Success:
            //  API call successful
            break;
            case AuthV4GoogleResponseFailShowLeaderboards:
            //  API call failed
            //  Please contact HIVE with the corresponding error code
            break;
            case AuthV4GoogleNeedSignIn:
            //  Google login is not done
            //  Please check your Google login status
            break;
            case AuthV4GoogleLogout:
            //  Logged out of Google account from the leaderboard window. Please implement game account logout according to internal policy.
            //  (No solution available)
            break;
        }
    }
});
// Not supported
Code Message How to solve
(Required implementation) AuthV4GoogleResponseFailShowLeaderboards An error occurred while performing the PGS feature. This issue may be temporary. If the error continues to occur, contact HIVE with the error message.
(Required implementation) AuthV4GoogleNeedSignIn The device is not signed in to PGS. Guide the user to sign in to PGS on the device.
AuthV4GoogleLogout The user signed out of the Google account in the achievements window. Implement game account sign-out according to your internal policy.