Skip to content

Smack 4.4 Readme and Upgrade Guide

Andrey edited this page Mar 18, 2023 · 12 revisions

The full list of fixed issue and improvements can be found in the Ignite's JIRA.

Notable changes and important new features

  • Minimum required Android SDK level raised to 19 (Android 4.4 KitKat).
  • Applied builder pattern to messages, IQs and presences.
  • Introduce modular transport API.
  • Support for end-to-end encryption using XEP-0373 - OpenPGP for XMPP.

Licensing

Starting with version 4.4.0, Smack includes a NOTICE file. Please refer to https://github.com/igniterealtime/Smack#license for the resulting requirements.

API Changes

  • Reworked Data-Form API by applying builder pattern.

Warning: This list may not be complete

Further API additions/changes/removals and improvements

Including Smack 4.4 into your project

Smack 4.4 provides three artifacts as entry points that you can refer to when including Smack in your project: smack-java8, smack-java8-full and smack-android. A typical Smack setup may also want to declare additional dependencies on smack-tcp, smack-extensions and smack-experimental, although this is not necessary when using the smack-java8-full.

Projects that target a JVM supporting Java8

With Gradle

repositories {
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots'
  }
  mavenCentral()
}
dependencies {
   implementation "org.igniterealtime.smack:smack-java8:4.4.0"
   // Optional for XMPPTCPConnection
   implementation "org.igniterealtime.smack:smack-tcp:4.4.0"
   // Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats, …)
   implementation "org.igniterealtime.smack:smack-im:4.4.0"
   // Optional for XMPP extensions support
   implementation "org.igniterealtime.smack:smack-extensions:4.4.0"
}

With Maven

<dependency>
        <groupId>org.igniterealtime.smack</groupId>
        <artifactId>smack-java8</artifactId>
        <version>4.4.0</version>
</dependency>
<dependency>
        <groupId>org.igniterealtime.smack</groupId>
        <artifactId>smack-tcp</artifactId>
        <version>4.4.0</version>
</dependency>
<dependency>
        <groupId>org.igniterealtime.smack</groupId>
        <artifactId>smack-im</artifactId>
        <version>4.4.0</version>
</dependency>
<dependency>
        <groupId>org.igniterealtime.smack</groupId>
        <artifactId>smack-extensions</artifactId>
        <version>4.4.0</version>
</dependency>

With Ivy

<dependency org="org.igniterealtime.smack" name="smack-java8" rev="4.4.0"/>
<dependency org="org.igniterealtime.smack" name="smack-tcp" rev="4.4.0"/>
<dependency org="org.igniterealtime.smack" name="smack-extensions" rev="4.4.0"/>

Projects that target Android

Make sure to call

AndroidSmackInitializer.initialize(Context);

once.

With Gradle

repositories {
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots'
  }
  mavenCentral()
}

Smack configuration with smack-extensions for XMPP over TCP

dependencies {
  implementation "org.igniterealtime.smack:smack-android-extensions:4.4.0"
  implementation "org.igniterealtime.smack:smack-tcp:4.4.0"
}

configurations {
	all*.exclude group: 'xpp3', module: 'xpp3'
	all*.exclude group: 'xpp3', module: 'xpp3_min'
}

Minimal Smack configuration for XMPP over TCP

dependencies {
  implementation "org.igniterealtime.smack:smack-android:4.4.0"
  implementation "org.igniterealtime.smack:smack-tcp:4.4.0"
}

configurations {
	all*.exclude group: 'xpp3', module: 'xpp3'
	all*.exclude group: 'xpp3', module: 'xpp3_min'
}

Smack configuration with experimental extensions (e.g. XEP-0280, XEP-0352, XEP-0332, XEP-0335)

dependencies {
  implementation "org.igniterealtime.smack:smack-android-extensions:4.4.0"
  implementation "org.igniterealtime.smack:smack-experimental:4.4.0"
  implementation "org.igniterealtime.smack:smack-tcp:4.4.0"
}

configurations {
	all*.exclude group: 'xpp3', module: 'xpp3'
	all*.exclude group: 'xpp3', module: 'xpp3_min'
}

What to do if there are any issues with this Smack version?

Please have a look at

https://github.com/igniterealtime/Smack/wiki/How-to-ask-for-help,-report-an-issue-and-possible-solve-the-problem-yourself

Please report bugs in the "Smack Developers" forum. The MUC smack@conference.igniterealtime.org can be used to discuss Smack and to ask for help.

Clone this wiki locally