queryTerms

Request terms and conditions items list from Gamebase console. This API can be used when you create custom terms and conditions agreement UI. If you call after logging in, you can also check whether the user agrees to the terms and conditions, except whether to receive notification.

Example Usage:

Gamebase.Terms.queryTerms(activity, new GamebaseDataCallback<GamebaseQueryTermsResult>() {
    @Override
    public void onCallback(GamebaseQueryTermsResult result, GamebaseException exception) {
        if (Gamebase.isSuccess(exception)) {
            // Succeeded.
            final int termsSeq = result.getTermsSeq();
            final String termsVersion = result.getTermsVersion();
            final String termsCountryType = result.getTermsCountryType();
            final List<GamebaseTermsContentDetail> contents = result.getContents();
        } else if (exception.getCode() == GamebaseError.UI_TERMS_NOT_EXIST_FOR_DEVICE_COUNTRY) {
            // Another country device.
            // Pass the 'terms and conditions' step.
        } else {
            // Failed.
        }
    }
});

Since

Added 2.20.0

Parameters

activity

Current activity.

callback

Information on terms and conditions registered in the console. After logging in, whether you agree to the terms and conditions is returned, except whether to receive notification.

See also