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
1 answer

How to implement message Acknowledgement in smack

I have successfully implemented one to one chat in my android application. Now i want to know my message is delivered or not. I googled my problem but unable to find any solution. thanks in advance.
begginer
  • 83
  • 1
  • 11
4
votes
0 answers

How to configure Push mode configuration in XMPP with FCM refresh token using smack in android?

Currently i'm using smack library for XMPP configuration and I want to do XMPP connection of Ejabberd to firebase by send RefreshToken to XMPP. I need to close connection when application is in background or kill and receive notification from…
Vishal Patoliya ツ
  • 3,170
  • 4
  • 24
  • 45
4
votes
1 answer

Send XMPP message without starting a chat

I am basically writing a XMPP client to automatically reply to "specific" chat messages. My setup is like this: I have pidgin running on my machine configured to run with an account x@xyz.com. I have my own jabber client configured to run with…
Aneesh
  • 928
  • 10
  • 20
4
votes
0 answers

Can't get users from roster (Smack)

I'm using Smack and xmpp for sending messages, I created two users in the server OpenFire, created group Friends and added both users on the group. Now I want to get users from the roster on my phone, I'm using such code for that: Roster roster =…
Lucky_girl
  • 4,543
  • 6
  • 42
  • 82
4
votes
2 answers

Delivering upstream messages via XMPP on Firebase Cloud Messaging misconceptions

I am trying to set up FCM functionalities into my app. At the moment, I would like to display a button such that when the user presses the button an upstream message is generated which is sent to Google's CCS. It is my understanding that this…
4
votes
3 answers

Android Smack SSL/TLS connection to XMPP Ejabberd server with CA Certificate

i'm developing my first XMPP Android application, i've not a lot practice in XMPP but actually i'm able to connect my Smack client to my Ejabberd server successfully, the problem comes out when i try to do the same using TLS (with CA…
MattC
  • 447
  • 6
  • 21
4
votes
2 answers

Sending Notification to user when user is offline in android using XMPP

I implemented an Android chat application using Smack client with XMPP server. Everything works fine when the user is online, now when the user is offline (the app is not in running state). I would like to push notification using GCM. Is there a…
4
votes
0 answers

AbstractXMPPConnection: Connection closed with error: java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

I am establishing connection with openfire using smack api at client side. able to generate successful connection and can chat.but after chatting some time I am getting the following exception. AbstractXMPPConnection: Connection closed with…
Chandra Kiran
  • 299
  • 1
  • 6
  • 14
4
votes
0 answers

How to exclude a specific package from the library jar in Android Studio?

I am facing an error of duplicate entry between smack and quickblox libraries. After excluding some groups and modules, I can add two libraries, but I failed to add a third one because of this error: Error:Execution failed for task…
Ali
  • 57
  • 9
4
votes
0 answers

Connection issue in smack Client is not or no longer connected

I am working on a mobile chat application, last few days I started facing issues with connection (my case is first time my connection works fine but when my app got disconnected (by loosing net connection or wifi turned off or poor network) then my…
Sunil Singh
  • 538
  • 3
  • 12
4
votes
3 answers

How to receive message without using createChat for android XMPP chat smack api

Hi I am confused with the logic of implementing chatManagerListener interface inside a Service. Below is my service code: public class MyService3 extends Service { ChatManager chatManager; ChatManagerListener…
Rahul Lohra
  • 824
  • 1
  • 10
  • 21
4
votes
1 answer

Adding Enhanced Debugger to view packet level information for Smack android based XMPP client

I'm referring to https://www.igniterealtime.org/builds/smack/docs/4.1.0/documentation/debugging.html for integrating debugger console in my android studio and added SmackConfiguration.DEBUG = true; but still can't see any debugging window. Please…
Dharmita bhatt
  • 475
  • 4
  • 16
4
votes
2 answers

Smack Android, creating a service to receive messages

I'm doing a chat with the library smack Android 4.1.4. This library uses the XMPP protocol. To receive messages, you must authenticate to a server (for example openfire) and login using XMPPCONNECTION. All of this is quite simple if performed when…
4
votes
1 answer

org.jivesoftware.smack.XMPPException$StreamErrorException improper-addressing

I am getting the following Exception running a SMACK client of Windows: - Sep 25, 2015 10:24:13 AM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener WARNING: Connection closed with…
mk1077
  • 63
  • 6
4
votes
3 answers

getting SocketTimeoutException while using smack 4.1.2 in android to connect to my ejabberd server

I am trying to connect to ejabberd server using smack API 4.1.2 (no asmack) on android device. while running smackClient program , I am getting below error java.net.SocketTimeOutException:Failed to connect to abc.example.com/182.*.*.* (on port…
Kartik Patel
  • 479
  • 1
  • 4
  • 19