smack

smack for android fails when using proguard

≯℡__Kan透↙ 提交于 2019-12-23 16:54:55
问题 I am using the smack library (4.1.2) in my Android app to connect to an XMPP server. It runs perfectly well when the code is NOT minified (ie with proguard). But in release mode, with proguard enabled, the app crashes as soon as it connects to the server. I am trying to keep all relevant smack classes unminified as suggested here: What are the recommended ProGuard rules for Smack 4.1? -keep class org.jivesoftware.smack.** { *; } -keep class org.jivesoftware.smackx.** { *; } But for me this

Smack 4.1 No Response within reply timeout

梦想与她 提交于 2019-12-23 07:47:34
问题 I am using the following code in my android app: Thread d = new Thread(new Runnable() { @Override public void run() { SmackConfiguration.setDefaultPacketReplyTimeout(10000); XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder() .setUsernameAndPassword("admin", "password") .setServiceName("192.168.0.200") .setHost("192.168.0.200") .setPort(5223).setSecurityMode(SecurityMode.ifpossible) .build(); AbstractXMPPConnection conn2 = new XMPPTCPConnection(config); try {

Sending inline images using Smack XMPP

为君一笑 提交于 2019-12-23 04:10:12
问题 I am about to create a simple xmpp java client application and for this I am considering to use the Smack XMPP library, which works pretty well. One feature of the client should be to send inline images to your chatpartner. I browsed through the javadoc of SMACK but I was not able to find how it's possible to send images or in general binary data with SMACK/XMPP. I am not talking about a standard file transfer that the receiving user has to accept, but rather an image which can be sent within

Android chat using Smack API and talk.goolgle.com server

丶灬走出姿态 提交于 2019-12-23 04:03:28
问题 I want to create an android chat application using smack api and talk.google.com server but the problem is that when I create a connection to Smack API using gmail id and password and check my user name using "connection.getuser()" my id is showm in following format "anything@gmail.com/Smack_ (some smack id)".Now if I send a message from my app using another phone to "anything@gmail.com" it is not recieved but if I send it to "anything@gmail.com/Smack _ (same smack id)" it is properly

Android chat using Smack API and talk.goolgle.com server

巧了我就是萌 提交于 2019-12-23 04:03:12
问题 I want to create an android chat application using smack api and talk.google.com server but the problem is that when I create a connection to Smack API using gmail id and password and check my user name using "connection.getuser()" my id is showm in following format "anything@gmail.com/Smack_ (some smack id)".Now if I send a message from my app using another phone to "anything@gmail.com" it is not recieved but if I send it to "anything@gmail.com/Smack _ (same smack id)" it is properly

Which aSmack jar file (android-14, android-15, …) should be included to support SDK version 14-19?

最后都变了- 提交于 2019-12-23 01:24:08
问题 I am stuck between two different errors. Unable to instantiate activity ComponentInfo unable-to-execute-dex-multiple-dex-files-define-lcom-myapp-rarray In order to fix one I go with solution as mentioned in 1 , and it leads to second error , and vice versa . 1st solution instructs to remove private libraries after going into buildpath , other ask to check mark private libraries. There is no problem with android - manifest , as there is activity Main specified My app was working fine until I

How to send a broadcast message with SmackAPI?

回眸只為那壹抹淺笑 提交于 2019-12-22 15:54:06
问题 We're developing special devices that uses XMPP to talk to each other. A new API i am developing now, should talk to these devices too. The problem i am facing - all these devices are building little groups - for each customer we have... so we will have a chat-room for each group of devices, or, for each of our customer with his bunch of devices ;) But now.. the api should be able to talk to every device that is connected. I don't need a real broadcast-mechanism - in the end, i will send a

Send XMPP (Smack) Message

梦想的初衷 提交于 2019-12-22 09:59:51
问题 Ok, the problem should be trivial but I can't get to the bottom of it. I have two users A & B Their JID's for this example will be A@123 and B@123 where 123 is the IP of the server. I'm sending a message from A->B using the following code: chat = chatmanager.createChat(username, new MessageListener() { public void processMessage(Chat chat, Message message) {}}); String sendUsername = username + "@123"; Message msgObj = new Message(sendUsername, Message.Type.chat); msgObj.setBody(message);

Could Not Connect XMPP Server with smack : EOF Exception when implementing GCM XMPP-based App Server

痴心易碎 提交于 2019-12-22 09:54:38
问题 java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen ...</mechanisms></stream:features>... @1:344 at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035) at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java

using XMPP for user location

僤鯓⒐⒋嵵緔 提交于 2019-12-22 08:35:06
问题 I want to create an application for Android that enables me to get the geolocation of a user. This has to be made as a client-server app and for the server side I'm using OpenFire. For getting the user's location I would have to use XEP-0080, right? And SmackAPI also? I'm completely new to XMPP and Smack, so if anyone could get me a few pointers or maybe examples or any kind of documentation about this I'd be very grateful. Thanks in advance for any help. 回答1: An Android project I’m currently