# queryPush

open fun queryPush(@NonNull activity: Activity, @NonNull callback: GamebaseDataCallback<PushConfiguration>)

Get push settings from the the push server.

This is legacy push API. We recommend to use the new API queryTokenInfo.

Example Usage:

    Gamebase.Push.queryPush(activity, new GamebaseDataCallback<PushConfiguration>() {
        @Override
        public void onCallback(PushConfiguration data, GamebaseException exception) {
            if (Gamebase.isSuccess(exception)) {
                // Query push succeeded.
                boolean enabledPush = data.pushEnabled;
                boolean enabledAdPush = data.adAgreement;
                boolean enabledAdPushNight = data.adAgreementNight;
            } else {
                // Query push failed.
            }
        }
    });

Content copied to clipboard

#### Since

Added 1.4.0.

#### Parameters

activity

Current activity.

callback

Callback pass to API result.

#### See also

PushConfiguration
GamebaseDataCallback