Discover XMPP Server Extensions

Is there a way to discover support for specific JEPs on any XMPP Server using the Smack API?

Yes, it’'s possible using XEP-0030, which is implemented by org.jivesoftware.smackx.ServiceDiscoveryManager.

When I list the features out of a connection, I get:

How can I see if a server handles XEP 22 for instance? (events)

For some reason, this XEP doesn’‘t specify a way to be detected. The only server-side support needed is the support for the offline event, which I know isn’'t supported by Wildfire.

Please note that this XEP is deprecated, XEP-0085 is the successor of it. Its section 4 explains how to detect its presence.