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
6
votes
4 answers

Creating new user with Smack on ejabberd throws XMPP Exception: forbidden(403)

Hi I am working on ejabberd and I am quite new to this technology. I am trying to add a user on my ejabberd server using this code: try { conf.setSASLAuthenticationEnabled(true); connection.connect(); …
Deven
  • 3,078
  • 1
  • 32
  • 34
6
votes
1 answer

how to handle keep alive connection in android Service

I am using asmack for an android IM application, where I am using remote service with AIDL interface. Inside of onStartCommand method of my service I write code as below. I create connection and then login using that. When anyone run my application…
aftab
  • 1,141
  • 8
  • 21
  • 40
6
votes
3 answers

Connect to Google Talk using smack

I want to develop a Java application which connects to Google Talk and allows a user to chat with it's friends. I am using smack API and the fallowing code: ConnectionConfiguration config = new…
Bogdan Chende
  • 179
  • 1
  • 3
  • 10
5
votes
2 answers

(a)Smack returns "service-unavailable (503)" error at login()

I'm trying to implement a simple jabber messenger on Android using asmack library. Here's the code: public boolean login() { if (connection != null && connection.isConnected()) { Log.i("XMPP", connection.getHost()); try …
Ivan Gromov
  • 4,195
  • 9
  • 41
  • 57
5
votes
4 answers

How to create a jabber/XMPP proxy/logging service?

I am working for a company that is using Google Chatback (anonymous chat with a support employee in my company's case) as the main chat service provider. This service uses the XMPP (formerly known as Jabber) protocol for sending and receiving…
Jes
  • 2,748
  • 18
  • 22
5
votes
2 answers

How to Integrate FCM with Ejabberd?

Environment: Ejabberd Version : 16.04 Smack-android-4.1.0 I have created an Android chat application with a XMPP server. However due to Google play permission issue I had to narrow down the feature from app which supported receiving incoming…
B378
  • 987
  • 2
  • 12
  • 27
5
votes
1 answer

java.lang.IllegalArgumentException: Username must not be null or empty ,AbstractXMPPConnection.java:484

I am using smack XMPP in my app for instant messages. Everything is working perfect Except this crash occurring randomly Fatal Exception: java.lang.IllegalArgumentException: Username must not be null or empty at…
Syeda Zunaira
  • 5,191
  • 3
  • 38
  • 70
5
votes
2 answers

Why the openfire's user remains ONLINE even with no SESSION exists in sessions

I'm developing an android app contains "Messaging" using OpenFire as an XMPP server and using Smack for android client. All functions works fine, but when a user is online(as you can see it's state in admin panel of openfire), and network…
Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52
5
votes
2 answers

Android: asmack(ported) or smack(patched)?

I have searched alot on google and in here to find the best featured API for XMPP client. I have found the following two: asmack: .http://code.google.com/p/asmack/ patched smack:…
mrfandus
  • 53
  • 1
  • 4
5
votes
1 answer

How to fast connect my XMPP based app like WhatsApp?

I am playing with Smack API and Openfire. I found, In XMPP protocol you have to open stream, log in and enable features for every time,which is very time consuming. Then how the famous massager app WhatsApp work, how it can connect in so less time?…
prem jangir
  • 300
  • 2
  • 13
5
votes
2 answers

smack connect to xmpp server with previous stream id

I'm building a chat application using xmpp over Ejabbered for server and smack for android client I've established connecting , login , send and receiving messages ,then I've faced a problem with user network disconnecting and reconnecting ,…
Ahmed na
  • 1,084
  • 2
  • 13
  • 34
5
votes
1 answer

Error while joining MUC room in XMPP(smack)

I am trying to create a multi user chat. I am getting error while joining the room. Method for creating chat room : public void createMultiUserChatRoom(String roomName, String nickName) { // Get the MultiUserChatManager …
Jennifer
  • 351
  • 6
  • 18
5
votes
0 answers

ReconnectionManager is not working correctly

I am using smack library to implement chat solution in android. It is making connection with openfire perfectly but reconnection is not working at all. I have a lost a connection on a device, on connection receive it does not reconnect or call any…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
5
votes
3 answers

SASL authorization failing while connecting to XMPP server

I am trying to connect to gmail using SMACK API through XMPP server. but getting the error : SASL authentication failed using mechanism PLAIN you can check a glimpse of code. I got it from net only ConnectionConfiguration connConfig = new…
SPB
  • 4,040
  • 16
  • 49
  • 62
5
votes
1 answer

Could not establish socket with any provided host

I am struggling with file transfer in android.I am using smack 4.1 to connect to openfire server. My problem is: When i am using Spark to Spark file transfer, it works fine.But when i transfer file from Spark to Android or Android to Android, The iq…
Lakhan Sharma
  • 1,741
  • 1
  • 12
  • 19