smack

Typing Status Smack 4.1

血红的双手。 提交于 2020-01-01 19:17:31
问题 Hey I am trying to get typing status when the other person starts writing even though it is returning an empty message with the state as a message but it is coming from proccessMessage method. Shouldn't it be returned in the stateChanged? I haven't enabled any PacketProvider though, Do i have to do it so this would be returned in the stateChanged method? I would appreciate any help. newChat = chatmanager.createChat(contactUsername + sc.DOMAIN, new ChatStateListener() { @Override public void

Typing Status Smack 4.1

限于喜欢 提交于 2020-01-01 19:17:25
问题 Hey I am trying to get typing status when the other person starts writing even though it is returning an empty message with the state as a message but it is coming from proccessMessage method. Shouldn't it be returned in the stateChanged? I haven't enabled any PacketProvider though, Do i have to do it so this would be returned in the stateChanged method? I would appreciate any help. newChat = chatmanager.createChat(contactUsername + sc.DOMAIN, new ChatStateListener() { @Override public void

Unable to get presence of roster by using smack, openfire

天大地大妈咪最大 提交于 2020-01-01 09:57:14
问题 I am new to smack API. I am trying to develop a chat application where I was trying for setting and getting the presence. When I change the presence of a user, its working perfectly fine and it is getting reflected in the Openfire Server. But when I tries to get the Presence of a user, I am always getting the status as 'unavailable' even if his presence in openfire is showing as 'available'. I am using the following code to set the status. Presence presence = new Presence(Presence.Type

how to get user online or offline in asmack, android [duplicate]

大憨熊 提交于 2020-01-01 08:54:10
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: XMPP aSmack - How can I get the current user state (offline/online/away/etc.)? I am developing chat app on Android base on asmack lib. I display all the user on the ListView but I use an image to show online/offline user. But It return offline image only, even the user is online, here is my code @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R

How to use smack with Openfire

给你一囗甜甜゛ 提交于 2020-01-01 05:19:08
问题 Hi I am planning to develop a chat client which can connect to gtalk facebook etc...I have decided to use the smack API along with openfire.. But I need little guidance as to how to use it with openfire server.. And does the openfire provide a basic UI like log in box chat window etc... I need to know how to plug or use smack with openfire Thanks:) 回答1: I have decided to use the smack API along with openfire.. But I need little guidance as to how to use it with openfire server.. What about

how to use smack 4.1 for how to send info query packet to xmpp server?

萝らか妹 提交于 2019-12-31 03:36:28
问题 how to send info query packet to xmpp server, in other words how to send "..." to server to query some information? <iq type='set' id='123'> <push xmlns='p1:push'> <keepalive max="30"/> <session duration="60"/> <body send="all" groupchat="true" from="jid"/> <status type="xa">Text Message when in push mode</status> <offline>false</offline> <notification> <type>applepush</type> <id>DeviceToken</id> </notification> <appid>application1</appid> </push> </iq> 回答1: The iq headers and the namespace

XMPP “stream:error (conflict)” on login with (a)Smack

自闭症网瘾萝莉.ら 提交于 2019-12-30 04:24:05
问题 Currently i am working with xmpp/jabber chat for android.i just tried with Openfire and try to connect my jabber account.connection was successful.but i am not able to send any message.it shows some conflict error.please check the error log.give me a solution for this. Initializing connection to server eworks port 5222 Connected: true Creating entry for buddy 'testuser2' with name testuser2 Sending mesage 'Hello mate' to user testuser2@eworks Buddy:testuser2 - Status:null stream:error

how to add roster with subscription mode “both”

拥有回忆 提交于 2019-12-29 13:17:23
问题 i'm using smack 3.1.0, and when i add a roster,i can't get subscription "both". who can help me? below is my code: Roster.setDefaultSubscriptionMode(Roster.SubscriptionMode.accept_all); Roster roster = connection.getRoster(); roster.createEntry("buddy@test.com","me",null) after the code execution, i observed in openfire the subscription is "to" 回答1: Rewriting @mschonaker's answer to be a little more clear. Both users need to subscribe to each other and accept the subscription request they

Getting all users from an openfire server using smack android

≡放荡痞女 提交于 2019-12-29 08:22:26
问题 i have a openfire server running on my localhost and i am successfully able to send and receive messages to registered users. however i am not been able to get all users from server. i am logged in with user that doesn't have a administration access. so do i need to give any permission on server side? The code i am using for getting all users is.. if ( xmpp.getConnection()== null || !xmpp.getConnection().isConnected()) return; try { UserSearchManager usm = new UserSearchManager(xmpp

Try to connect to server with XMPP Connection

老子叫甜甜 提交于 2019-12-25 12:44:13
问题 I am trying to connect from a blackberry device to an XMPP server. I searched over the web and found the smack.jar file that has the XMPP classes ready for use. So I created a new project and added the smack.jar file to the imported jar files. Then in the project I added the following: public void login(String userName, String password) throws XMPPException { ConnectionConfiguration config = new ConnectionConfiguration(IP, PORT, "gmail.com"); connection = new XMPPConnection(config);