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

Unable to change presence status of my user with Smack

I tried to set online mode but it doesn't work through a Roster. I ran this code and check my localhost server, the mode still "available" and not "Do not disturb". final Connection connection = new…
emeraldhieu
  • 9,380
  • 19
  • 81
  • 139
8
votes
2 answers

How to authenticate to Google Talk with AccountManager's authentication token using Smack API?

This question is similar to: Authenticate to Google Talk (XMPP, Smack) using an authToken I have android.accounts.AccountManager class and its methods to get authentication token for Google account: public AccountManagerFuture getAuthToken…
Bell
  • 81
  • 1
  • 2
8
votes
2 answers

difference between XMPP servername and XMPP servicename?

In Smack API, there is a configuration class for connection, described at this page ConnectionConfiguration I am confused about the distinction between service name and server name. Suppose I have a computer named "mybox.mydomain.com", and I have…
Jus12
  • 17,824
  • 28
  • 99
  • 157
8
votes
0 answers

How can I get last message of each conversation(per JIDs) from openfire?

I'm developing an instant messaging app on android with SMACK library that uses OPENFIRE as a xmpp server. I want to get last message of each conversation from MessageArchiveManager in openfire server that was enabled by MONITORING SERVICE…
Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52
8
votes
2 answers

Android/Smack: Keep XMPP connection alive in sleep mode

I have an Android application that has a chat client as one of its features. The chat client uses XMPP based on the Smack library for Android and running Openfire as XMPP server in the background. The connection is established using BOSH The whole…
Christian
  • 3,239
  • 5
  • 38
  • 79
8
votes
2 answers

how to add new buddy in roster in xmpp

Hi i am using smack.jar.I am able to connect with gtalk using it.Using Roster.getentries() i can get my buddy list.But how can i add new friends to my buddyList.Is there any API smack exposes to add new users?? Thanks
SPB
  • 4,040
  • 16
  • 49
  • 62
8
votes
1 answer

Routing error between Smack and Openfire on localhost

I have a Java application implementing Smack 4.1.7 that I am using as a mock client for Openfire 4.0.2. At the moment, Openfire is running on my localhost. Smack can login and authenticate properly with this…
guik
  • 419
  • 6
  • 11
8
votes
1 answer

Sending and Receiving messages using Smack Api for Android

I'm trying since last four days to send and receive chat message using own XMPP and with Smack+OpenFire. According to Smack's "readme.txt' i set up the connection and got logged user in. The code of connection and login is this public static String…
Devendra Singh
  • 2,343
  • 4
  • 26
  • 47
8
votes
1 answer

Android - Smack presence and "is typing" features not working

I'm using the Smack library v4.1.0 (not aSmack) for Chat feature within an android app. I can't seem to get the following two feature to work: User Presence (Online, Last Seen) Chat Message Status (Sent, Delivered, Read) For User Presence, I use…
Mahendra Liya
  • 12,912
  • 14
  • 88
  • 114
8
votes
5 answers

How retrieve Chat History using Java Smack library from openfire server?

After installing Open Archive plugin in the Openfire server I can see the chat conversation between two user from the openfire admin panel which is pretty easy and that is web based too. Now I want to retrive those conversation or chat history from…
Dhiren Hamal
  • 874
  • 1
  • 12
  • 31
8
votes
0 answers

XMPP “stream:error (conflict)” when try to reconnect or login

I am using Smack and Openfire server for a chat client, all things working well like chat, sending an invitation for a new addition of user, getting list of available users etc. I don't have a clue what to do if the connection is in a Sticky Service…
Saty
  • 2,563
  • 3
  • 37
  • 88
8
votes
1 answer

Android background service for Smack (XMPP) chat application

I am implementing a chat app using asmack library. I want to start a always running service where all the connection management task is to be done and that should be keep on receiving the incoming packets and saving the messages in my sqlite…
Rahul Rastogi
  • 4,486
  • 5
  • 32
  • 51
8
votes
4 answers

Issue in blocking user in chatlist using smack and open fire server

I want to block a particular friend from my chat list with XMPP. code works fine. There is no Exception, but I am not able to block a user. I'm using open fire server. what changes should i made on server? Can u guys have any idea? My code: public…
Ganesh karthik
  • 313
  • 1
  • 9
8
votes
2 answers

Android xmpp MUC setting default configuration

Am using the Xabber open source project and am able to create a new group, But it always says: This room is locked from entry until configuration is confirmed. I tried to set a default configuration but it throws me exception: 401 not authorized.…
sukarno
  • 597
  • 2
  • 10
  • 31
7
votes
3 answers

How to get custom attribute value from an XMPP XML message?

Ok guys, simple question but pretty important to me. so, other android client are sending this xml msg: normal
user724861
  • 1,074
  • 3
  • 17
  • 33