Questions tagged [smack]

Smack is an XMPP (Jabber) client library written in Java for Android and Java SE. It provides a simple API allowing developers to write clients for XMPP services.

Smack is an Open Source Java library for writing XMPP based clients. It provides access to the core functionality as well as many of the XMPP extensions. Smack supports both standard Java and Android since version 4.1 and obsoletes the fork.

Note: For Linux SMACK (Simplified Mandatory Access Control Kernel) see .

1476 questions
4
votes
2 answers

Smack API - Read Chat History from Openfire Server

How can I fetch chat log or chat history from Openfire server using Smack library into an Android application?
sumeet
  • 525
  • 2
  • 7
  • 16
4
votes
1 answer

smack api get all public rooms on openfire server

I am using the XMPP smack api to connect to an Openfire server. I am trying to query the server to return all public rooms available without knowing this names of the rooms in advance. The goal of this is so that my client can display a list of…
pat8719
  • 1,700
  • 1
  • 26
  • 47
4
votes
1 answer

java.lang.AssertionError when update to Android studio 4.1

I am facing an issue with the library smack. I got an exception like below when I update to Android studio to 4.1 and Gradle to 6.5 Caused by: java.lang.AssertionError at…
Vinayak B
  • 4,430
  • 4
  • 28
  • 58
4
votes
2 answers

filetransfer in android through xmpp?

I am just trying to transfer a file through xmpp.I am using asmack lib.I am getting exception below. E/AndroidRuntime( 332): FATAL EXCEPTION: main E/AndroidRuntime( 332): java.lang.NullPointerException E/AndroidRuntime( 332): at…
Hitendra
  • 3,218
  • 7
  • 45
  • 74
4
votes
1 answer

Authenticate to Google Talk (XMPP, Smack) using an authToken

The app I'm writing is connecting to a XMPP server, and if the user chooses, I want to give them the option to connect to their google chat account, without having to enter the credentials... To do this, I'd get the permission to use the google…
Artiom Chilaru
  • 11,811
  • 4
  • 41
  • 52
4
votes
4 answers

How to check whether the client is connected to XMPP server or not

I am working an XMPP client for both Android and iPhone. I have been able to connect to the server and get messages too. But the Client is disconnecting with the XMPP server after few mins. The IOS XMPP Framework consists of a delegate method that…
Rahul Kalidindi
  • 4,666
  • 14
  • 56
  • 92
4
votes
5 answers

XMPP : Asmack Connection PacketListener Issue...

I am using asmack api for the Android XMPP Integration... After the successful authentication for the xmpp connection, I have used PacketListener for the incoming message notification. My application is tab based application. When I am moving to…
Vishal Khakhkhar
  • 2,106
  • 3
  • 29
  • 60
4
votes
4 answers

SASL Authentication failed while integrating facebook chat using Smack

I am trying to integrate facebook chat using smack API.But i get an error telling authentication failed using digest md5... Here s the code for authentication: SASLAuthentication.registerSASLMechanism("DIGEST-MD5", SASLDigestMD5Mechanism.class); …
enthusiastic
  • 1,702
  • 4
  • 19
  • 31
4
votes
4 answers

Best way to keepAlive Connection With Xmpp Server in Android

I am working on chat application and using ejabberd saas edition as xmpp server for it. I am using smack library ver-4.2.3. To keep connection alive I am using ping manager. Here is the code I am…
Snehangshu Kar
  • 445
  • 2
  • 13
4
votes
2 answers

XMPP events on Android

I'm trying to develop a background process that intercepts a XMPP message and performs an action, I'm using asmack as the main XMPP library. I presume I need a broadcastReciever that responds to a specific intent. The question is how to raise the…
4
votes
1 answer

how to publish and parse custom payload for pubsub xmpp smack library

this question is asked before here and here but i dont get answer from there. I'm developing application in which i'm using pubsub and xmpp, for android i'm using smack library. i want to send custom payload to the node and on receiving custom…
gaurang
  • 2,217
  • 2
  • 22
  • 44
4
votes
2 answers

XMPP: RFC on establishing mutual subscription when original requester is offline (subscribed presence)

we've got an XMPP server (OpenFire) and a custom client based on the Java Smack XMPP stack. We're using manual subscription acceptance, so clients have to exchange subscribe and subscribed presences. As noted in the RFC, subscribe presences ("I want…
Florian Thiel
  • 497
  • 4
  • 10
4
votes
1 answer

Creating Custom Stanza in smack 4.2

How can I sent a custom IQ Stanza using smack 4.2 in android. I tried to convert the following stanza in smack IQ but unsuccessful
K Guru
  • 1,292
  • 2
  • 17
  • 36
4
votes
0 answers

SSL handshake hang

I have seen this question around the forums but couldn't find any appropriate fix. Also all those questions are missing some info, so thought to put all what i have learned here. connecting the dots. I am working with SSL/TLS in openfire with 2 way…
Farhan
  • 13,290
  • 2
  • 33
  • 59
4
votes
0 answers

Unknown host exception while connecting with Ejabberd Server hosted on server machine from Android API

I am using SMACK API 4.1.4 for communicating with Ejabberd server for chatting from my Android app. My Ejabberd server is hosted over domain name i.e:- "dev.oodlesvdct.in". I am getting Unknown host exception while calling the connect method of…
Parveen yadav
  • 2,252
  • 1
  • 21
  • 35