powered by Jive Software

Xep-0332

Hello devs,

I’m using asmack in my android project. In this project I’m using xep-0332 (which is experimental). So, I’ve created necessary extensions and providers. And I would like to include them into smack, in order other developers could make use of this.

Now I’m going to create unit tests. And here comes the question

According to smack documentation test classes should extend SmackTestCase. Is this mandatory if I only have extensions and providers?

P.S. I do have agreement of my employer to provide the code to smack

Best regards

Wonderful, thanks for your contribution. I can’t answer your question though, but I am sure Flow will chime in.

Great news! XEP-332 support for Smack is much appreciated.

No, it’s not mandatory to extend the SmackTestCase for unit tests. In fact DOC-1984 is a bit inaccurate there, as SmackTestCase is used for the integration tests and not the unit tests. Feel free to do whatever suits you best and is beneficial for the unit tests.

What is important is that you

  • Base your work on the latest Smack master (normally I would say on the master found in igniterealtimes github repo, but I just pushed a change to my repo on github that changes the exceptions API so you should use this version).

  • Create a new gradle subproject for the XEP-332 specific code, just like we do for standard XMPP over TCP and BOSH

  • Build often a aSmack version of your Smack code. We support Android API 8 or higher for aSmack, but not every Java SE API is availabe on this Android API level!

You are also welcome to join #smack in freenode and idle around there. It’s usually easier to ask a quick question regarding development in IRC, compared to posting in the forum and helps coordinating the development.

Thank you for your answers!

I’ll get back to you when my tests are ready

Just send a pull request. First time in my life

Please, let me know if any additional information should be provided or any modification to the code must be done.

I had created gradle subproject named ‘hoxt’ (abbreviation of “Http Over Xmpp Transport”).

I had also added this subproject into smack’s settings.gradle.

Beside that the code is really trivial. There are no android/java se specific features. So, I expect no problems on those platforms.

The code also re-uses code for shim extension.

The only limitation is that 2 featres of xep-0332 are not supported: jingle and sipub. They are not used yet

Please, let me know if any additional information should be provided or any modification to the code must be done.
Will have a look. Let’s see

Thanks for your contribution!

Logged as SMACK-552

XEP-0332 is supported in smack 4.0.0.

Will mark this discussion as answered