code: public boolean isLastActivitySupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, LastActivity.NAMESPACE);
      }
docs: Returns true if Last Activity (XEP-0012) is supported by a given JID.
  
  @param jid a JID to be tested for Last Activity support
  @return true if Last Activity is supported, otherwise false
  @throws NotConnectedException
  @throws XMPPErrorException
  @throws NoResponseException
  @throws InterruptedException