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

How to change your own name using Smack?

You can use RosterEntry to get the name of your contacts. But how I change my own name and it appears to my contacts when they do RosterEntry entry = roster.getEntries("myuser"); entry.getName(); // It needs to show my updated name Thanks in…
7
votes
3 answers

getSearchForm returns null when using UserSearch in XMPP with aSmack

I have this code, almost unmodified from examples: UserSearchManager usm = new UserSearchManager(conn); Form searchForm = usm.getSearchForm("search.myserver.com"); Form answerForm =…
Nacho L.
  • 9,582
  • 2
  • 25
  • 25
7
votes
1 answer

Getting forbidden auth when group member tries to fetch member list

I'm trying to fetch member list using getMembers() but I'm getting 'error-code: 403, forbidden-auth' the user which is trying to get a member list has is a member of a group but I if I do the same operation by the owner he can get a list…
user2934930
  • 1,076
  • 2
  • 12
  • 26
7
votes
4 answers

how to stop opening of duplicate window using Smack API in swing?

I have 2 swing classes which extends JFrame. Both have show() method in there constructor. From ClassOne i called ClassTwo like new ClassTwo() on button click event. But if i press the button again new window for ClassTwo is opened. So how can i…
Harry Joy
  • 58,650
  • 30
  • 162
  • 207
7
votes
0 answers

how to get offline pubsub message from stanza using smack

I want to get the offline message, I'm using pubsub and I have added addItemEventListener on a node but when the user gets online then the user gets a message in stanza, not in the event listener's handlePublishedItems method. I want to know that if…
gaurang
  • 2,217
  • 2
  • 22
  • 44
7
votes
2 answers

Smack message listener not called and connection unstable

I have the following code which should listen for messages: ChatManager chatmanager = ChatManager.getInstanceFor(xmppManager.getConnection()); chat = chatmanager.createChat(otherJabberId); chat.addMessageListener(new ChatMessageListener() { …
Gooey
  • 4,740
  • 10
  • 42
  • 76
7
votes
1 answer

How to use XEP 198 (Stream Management) from smack 4.1?

I am new to XMPP. I'm using smack on android for providing chat in my application. In smack 4.1, support for stream management is added so I used XMPPTCPConnection.setUseStreamManagementDefault(true); to enable this and I'm getting : 03-27…
Laxman Marothiya
  • 383
  • 3
  • 13
7
votes
2 answers

get online users(Roster entries) using smack 4.1 in android

I have been trying to get roster entries using smack 4.1 beta 2 in android. https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-UpgradeGuide Quotes from above link.. "Roster now follows the Manager pattern (use Roster.instanceFor to…
Hitendra
  • 3,218
  • 7
  • 45
  • 74
7
votes
5 answers

How to search registered users by name in XMPP server with Smack?

I'm working on developing chat application in Android with asmack library. I'm using EJABBERD XMPP server. I have done some functionality including login, registration and roster entries etc., Now i want to search Registered users from XMPP…
Prabhu
  • 840
  • 11
  • 28
7
votes
1 answer

Smack throws "java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory:"

So im using Smack to run my chat bot for league of legends, however I can't even get the bot to show up because of a missing class error that I can't seem to figure out. Code and error below, Thanks for any help, -Nick Also: yes, this code was taken…
Nick
  • 85
  • 1
  • 1
  • 5
7
votes
3 answers

XEP-0080 User Location in Smack Library

I would like to create a simple XMPP client in java that shares his location (XEP-0080) with other clients. I already know I can use the smack library for XMPP and that it supports PEP, which is needed for XEP-0080. Does anyone have an example how…
Kristof
  • 557
  • 6
  • 14
7
votes
0 answers

How to get typing status notification in XMPP

I am trying to setup an XMPP chat application. Right now I am able to send messages between gmail to gmail. I want typing notification such as user typed something or user is typing,,, Like that. I am using a main class and a Message listener…
Aneez
  • 205
  • 3
  • 12
7
votes
2 answers

How can I make use of XMPP XEP-0184 "Message Delivery Receipts" with Smack?

Hi is there any way to do android xmpp client which will be able to get message receive confirmation (XEP-0184) I read that there is XEP-0184 in smack but normal smack is not working with android(or I can't do it) there is always SASL authentication…
Mathew1990
  • 327
  • 2
  • 17
7
votes
3 answers

Does Google Talk support XMPP Multi-User Chat?

I'm using Smack to develop an internal dashboard in Java/Spark that would start a Google Talk conference between a LDAP user group. When I run MultiUserChat.isServiceEnabled(connection, "user@mydomain.com") it returns false. I know that via the…
berwyn
  • 986
  • 7
  • 23
7
votes
1 answer

Check if a user exist on server in XMPP with (a)smack

I'm working on a chat application using asmack as a library and on android platform. Is there is any way that before adding friend in Roster can I check that friend exist on server or not?
nitin tyagi
  • 1,176
  • 1
  • 19
  • 52