code: public static void cancelTasks(final Context context,
        Class<? extends GroundyService> groundyServiceClass, final int groupId, final int reason,
        final CancelListener cancelListener) {
      if (groupId <= 0) {
        throw new IllegalStateException("Group id must be greater than zero");
      }
      new GroundyServiceConnection(context, groundyServiceClass) {
        @Override
        protected void onGroundyServiceBound(GroundyService.GroundyServiceBinder binder) {
          GroundyService.CancelGroupResponse cancelGroupResponse =
              binder.cancelTasks(groupId, reason);
          if (cancelListener != null) {
            cancelListener.onCancelResult(groupId, cancelGroupResponse);
          }
        }
      }.start();
    }
docs: Cancels all tasks of the specified group w/ the specified reason.
  
  @param context used to interact with the service
  @param groupId the group id to cancel
  @param cancelListener callback for cancel result