Smack 4.4 Readme and Upgrade Guide
Pages 27
-
- Notable changes and important new features
- Licensing
- API Changes
- Further API additions/changes/removals and improvements
- Including Smack 4.4 into your project
- Projects that target a JVM supporting Java8
- With Gradle
- With Maven
- With Ivy
- Projects that target Android
- With Gradle
- Smack configuration with smack-extensions for XMPP over TCP
- Minimal Smack configuration for XMPP over TCP
- Smack configuration with experimental extensions (e.g. XEP-0280, XEP-0352, XEP-0332, XEP-0335)
- What to do if there are any issues with this Smack version?
Clone this wiki locally
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
- Add support for XEP-0107: User Mood
- Add support for XEP-0118: UserTune
- Add support for XEP-0221: Data Forms Media Element
- Add support for XEP-0232: Software Information
- Add support for XEP-0315: Data Forms XML Element
- Add support for XEP-0328: JID Prep
- Add support for XEP-0350: Data Forms Geolocation Element
- Add support for XEP-0373: OpenPGP for XMPP
- Add support for XEP-0374: OpenPGP for XMPP: Instant Messaging
- Add support for XEP-0418: DNS Queries over XMPP (DoX)
- Add support for XEP-0422: Message Fastening
- Add support for XEP-0424: Message Retraction
- Add support for XEP-0428: Fallback Indication
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
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.