Skip to content

Commit

Permalink
Bump Smack to 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Mar 27, 2017
1 parent 986cdb2 commit 8096ef2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aSmack/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'

ext {
smackVersion = "4.2.0-rc2"
smackVersion = "4.2.0"
}

android {
Expand Down
14 changes: 0 additions & 14 deletions app/src/main/java/com/clayster/xmppiotdemo/XmppIotThing.java
Expand Up @@ -39,7 +39,6 @@
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.filter.PresenceTypeFilter;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.roster.Roster;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smackx.iot.Thing;
Expand All @@ -51,12 +50,6 @@
import org.jivesoftware.smackx.iot.data.ThingMomentaryReadOutRequest;
import org.jivesoftware.smackx.iot.data.ThingMomentaryReadOutResult;
import org.jivesoftware.smackx.iot.data.element.IoTDataField;
import org.jivesoftware.smackx.iot.data.element.IoTDataReadOutAccepted;
import org.jivesoftware.smackx.iot.data.element.IoTDataRequest;
import org.jivesoftware.smackx.iot.data.element.IoTFieldsExtension;
import org.jivesoftware.smackx.iot.data.provider.IoTDataRequestProvider;
import org.jivesoftware.smackx.iot.data.provider.IoTDataReadOutAcceptedProvider;
import org.jivesoftware.smackx.iot.data.provider.IoTFieldsExtensionProvider;
import org.jivesoftware.smackx.iot.discovery.IoTClaimedException;
import org.jivesoftware.smackx.iot.discovery.IoTDiscoveryManager;
import org.jivesoftware.smackx.iot.discovery.ThingState;
Expand All @@ -81,13 +74,6 @@ public class XmppIotThing implements ThingMomentaryReadOutRequest, ThingControlR

private static final Logger LOGGER = Logger.getLogger(XmppIotThing.class.getName());

static {
// Workaround for provider enties in Smack <= 4.2.0-rc2. Remove when Smack >= 4.2.0-rc3 is used.
ProviderManager.addIQProvider(IoTDataRequest.ELEMENT, IoTDataRequest.NAMESPACE, new IoTDataRequestProvider());
ProviderManager.addIQProvider(IoTDataReadOutAccepted.ELEMENT, IoTDataReadOutAccepted.NAMESPACE, new IoTDataReadOutAcceptedProvider());
ProviderManager.addExtensionProvider(IoTFieldsExtension.ELEMENT, IoTFieldsExtension.NAMESPACE, new IoTFieldsExtensionProvider());
}

private static XmppIotThing INSTANCE;

public static synchronized XmppIotThing getInstance(Context context) {
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/clayster/xmppiotdemo/XmppManager.java
Expand Up @@ -30,6 +30,7 @@
import org.asmack.core.ManagedXmppConnection;
import org.asmack.core.XmppConnectionState;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.XMPPConnection;
Expand Down Expand Up @@ -60,6 +61,10 @@ public class XmppManager {

private static final Logger LOGGER = Logger.getLogger(XmppManager.class.getName());

static {
SmackConfiguration.addDisabledSmackClass("org.jivesoftware.smackx.httpupload");
}

private static XmppManager INSTANCE;

public static synchronized XmppManager getInstance(Context context) {
Expand Down

0 comments on commit 8096ef2

Please sign in to comment.