@Override
 public void executeAsync() {
   QBPagedRequestBuilder requestBuilder = new QBPagedRequestBuilder(20, 1);
   Bundle params = new Bundle();
   ArrayList<QBEvent> events = null;
   try {
     events = QBPushNotifications.getEvents(requestBuilder, params);
   } catch (QBResponseException e) {
     setException(e);
   }
   if (events != null) {
     Log.i(TAG, ">>> Events: " + events.toString());
     Log.i(TAG, "currentPage: " + params.getInt(Consts.CURR_PAGE));
     Log.i(TAG, "perPage: " + params.getInt(Consts.PER_PAGE));
     Log.i(TAG, "totalPages: " + params.getInt(Consts.TOTAL_ENTRIES));
   }
 }
        @Override
        public void execute() {
          QBPagedRequestBuilder requestBuilder = new QBPagedRequestBuilder(20, 1);
          QBPushNotifications.getEvents(
              requestBuilder,
              new QBEntityCallback<ArrayList<QBEvent>>() {

                @Override
                public void onSuccess(ArrayList<QBEvent> events, Bundle args) {
                  Log.i(TAG, ">>> Events: " + events.toString());
                  Log.i(TAG, "currentPage: " + args.getInt(Consts.CURR_PAGE));
                  Log.i(TAG, "perPage: " + args.getInt(Consts.PER_PAGE));
                  Log.i(TAG, "totalPages: " + args.getInt(Consts.TOTAL_ENTRIES));
                }

                @Override
                public void onError(QBResponseException errors) {
                  handleErrors(errors);
                }
              });
        }