asmack

How to parse a CustomIQ in ASMACK

99封情书 提交于 2019-12-10 10:37:06
问题 I am using ASMACK library fo my application. I received the following IQ from my server. <iq id='bind_2' type='result'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid username='xx' fullname='yy'>xx@aa.bb.cc.dd/Resource</jid></bind></iq> For parsing this IQ, I added the IQProvider while setting XmppConnection configuration by using ProviderManager class as ProviderManager.getInstance().addIQProvider("bind", "urn:ietf:params:xml:ns:xmpp-bind", new CustomIQProvider()); And my

Smack's FileTransferManager.createOutgoingFileTransfer only accepts full JIDs. How can I determine the full JID of a user in Smack?

旧街凉风 提交于 2019-12-10 10:13:07
问题 After hours of debugging and trying to find out why the file transfer was not working using aSmack, while normal messaging was, I finally managed to pin it down to this. The Openfire server is sending the Rosters' JID missing the / at the end when I follow the method given in the Smack documentation to get a user's Roster list. Collection<RosterEntry> entries = roster.getEntries(); for (RosterEntry r : entries) { Log.v("Gabriel","Receiving: " + r.getUser()); } For example if I receive a

java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream>

丶灬走出姿态 提交于 2019-12-10 05:51:55
问题 I am working on a chat app using xmpp,As per our requirement we have three server Apache Tomcat 7,ejabbered 2.1.11 and mysql 5.5, to run xmppbot on tomcat used below library -Smack-core-4.0.3.jar -smack-tcp-4.0.3.jar -xlightweb2.5.jar -xpp3-1.1.3.3.jar -xSocket-2.4.6.jar Using above library I am able to Connect with ejabberd and able to login with my login id and password but after some time of logging in connection gets close automatically and a am getting below stack trace Sep 16, 2014 4:36

Integrating Smack with Android Studio project for chat application

无人久伴 提交于 2019-12-08 14:36:20
问题 I am trying to implement a chat messenger using ejabberd server and smack library but having a hard time to integrate all the jars and dependencies of smack. I am using android Studio. My build.gradle(module): apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.example.nit.xmppclient" minSdkVersion 18 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles

Is it possible to get all users list which contain in the openfire?

房东的猫 提交于 2019-12-08 12:34:55
问题 I am doing an app chat in android by asmack with XMPP and want to user client install the application he will be able to retrieve The list of all the users which contain on the database. This will allow to the client be able to select user from the List and joined him to list friend one on one. How can I do that? If it not possible, how can achieve that? 回答1: Get the WebManager Instance. WebManager webMan = ...; UserManager userMan = webMan.getUserManager(); userMan.getUsers(); // Returns the

Debug XMPP Android client with aSmack, Eclipse and the enhanced debugger.

非 Y 不嫁゛ 提交于 2019-12-08 09:04:59
问题 I'm making an application with the Android XMPP library aSmack with Eclipse. I can not get debug is launched in a separate window as instructed smack documentation: http://www.igniterealtime.org/builds/smack/docs/latest/documentation/debugging.html I imported smackx-debug.jar inside the libs folder and I've added this line to the code: Connection.DEBUG_ENABLED = false; The debug occurs, but in console of logcat, not a Enhanced Debugger. 回答1: aSmack is not able to use the enhanced debugger of

aSmack 4.0.* XMPPTCPConnection can't connect to OpenFire and Ejabbered (SmackException$NoResponseException)

房东的猫 提交于 2019-12-08 06:02:00
问题 I am using asmack-android-8-source-4.0.6 when i try to connect to the server whether it is openFire or Ejabbered i get this exception org.jivesoftware.smack.SmackException$NoResponseException here's my code: SmackAndroid.init(getApplicationContext()); ConnectionConfiguration conConfig = new ConnectionConfiguration(HOST, PORT); conConfig.setDebuggerEnabled(true); connection = new XMPPTCPConnection(conConfig); try { connection.connect(); Log.i("AppName", "CONNECTED TO " + connection.getHost());

SImple Asmack program not working

人盡茶涼 提交于 2019-12-08 05:26:19
问题 Simplest possible code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SmackAndroid.init(this); // Create a connection to the jabber.org server. XMPPTCPConnection conn1 = new XMPPTCPConnection("xmpp-hosting.de"); try { conn1.connect(); } catch (SmackException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch

NoSuchAlgorithmException when using aSmack 0.8.3 for XMPP chat application

删除回忆录丶 提交于 2019-12-08 03:06:27
问题 I have included the logcat output. Please help me resolve this issue. 08-09 11:06:32.762: WARN/NetworkManagementSocketTagger(883): setKernelCountSet(10012, 0) failed with errno -2 08-09 11:06:32.856: WARN/System.err(1567): java.security.KeyStoreException: ava.security.NoSuchAlgorithmException: KeyStore jks implementation not found 08-09 11:06:32.856: WARN/System.err(1567): at java.security.KeyStore.getInstance(KeyStore.java:119) 08-09 11:06:32.856: WARN/System.err(1567): at org.jivesoftware

How to create Group in aSmack xmpp in android ?

家住魔仙堡 提交于 2019-12-08 00:13:28
问题 I am getting class cast exception while creating muc in android. E/AndroidRuntime(31002): Caused by: java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension E/AndroidRuntime(31002): at org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java:2000) E/AndroidRuntime(31002): at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364) 回答1: You can create user Group by , public boolean createGroup(XMPPConnection connection,String