code: public void createItemAndRequestSubscription(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          createItem(jid, name, groups);
  
          sendSubscriptionRequest(jid);
      }
docs: Creates a new roster entry and presence subscription. The server will asynchronously
  update the roster with the subscription status.
  
  @param jid the XMPP address of the contact (e.g. johndoe@jabber.org)
  @param name   the nickname of the user.
  @param groups the list of group names the entry will belong to, or <tt>null</tt> if the
  the roster entry won't belong to a group.
  @throws NoResponseException if there was no response from the server.
  @throws XMPPErrorException if an XMPP exception occurs.
  @throws NotLoggedInException If not logged in.
  @throws NotConnectedException
  @throws InterruptedException
  @since 4.4.0