asmack

Xmpp FileTransnfer in Android giving 503-service unavailable Error

别说谁变了你拦得住时间么 提交于 2019-12-05 07:12:38
问题 Now am working with Xmpp file Transfer in Android.While am sending files it give a 503 service unavailable error. > 07-29 15:33:12.183: D/SMACK(22151): 03:33:12 PM SENT (1095973320): > <iq id="s9DTB-10" to="jithu4@jabber.org/Smack" > from="jithu1@jabber.org/Smack" type="set"><si > xmlns="http://jabber.org/protocol/si" id="jsi_6388535575928662640" > mime-type="image/jpeg" > profile="http://jabber.org/protocol/si/profile/file-transfer"><file > xmlns="http://jabber.org/protocol/si/profile/file

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

Deadly 提交于 2019-12-05 06:27:59
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 I Found the answer : UserSearchManager search = new UserSearchManager(mXMPPConnection); Form searchForm = search .getSearchForm("search." + mXMPPConnection.getServiceName()); Form answerForm = searchForm.createAnswerForm(); answerForm.setAnswer("Username", true); answerForm.setAnswer("search", user); ReportedData data = search .getSearchResults(answerForm, "search." + mXMPPConnection

Unable to connect XMPP server with ASmack in Android

南笙酒味 提交于 2019-12-04 19:39:45
I have a fully working Chat Client that I made in Java. Now I'm looking forward to implement the same on my android device. I started off with importing the ASmack Library in my project and I'm checking at each phase to avoid errors. I'm stuck at the very first step though. My Activity is not able to find the class in ASmack Jar, hence I assume I'm unable to proceed. My Simple code : package com.test.mypro; import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import android.app.Activity; import android

Getting offline messages in android chat application with use of asmack library

怎甘沉沦 提交于 2019-12-04 14:18:20
问题 I am using asmack library for my chat application.I am using below described code for getting messagecount: ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(connection); DiscoverInfo info = manager.discoverInfo(null,"http://jabber.org/protocol/offline"); Form extendedInfo = Form.getFormFrom(info); if (extendedInfo != null) { String value = extendedInfo.getField("number_of_messages").getValues().next(); Log.e(TAG, "offline message"+value); } But i got exception as

Using the Android TrustStore for aSmack in Android 4+ (ICS)

不问归期 提交于 2019-12-04 14:08:53
问题 I am not an expert on keystores and have a hard time understanding the nuances of this but this is how far I got: In creating a xmpp-connection using the asmack build found here one still has to change the truststore, which usually, so say multiple sources on the web, is done using these commands ConnectionConfiguration config = new ConnectionConfiguration(host, Integer.parseInt(port), service); config.setTruststorePath("/system/etc/security/cacerts.bks"); config.setTruststorePassword(

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

≡放荡痞女 提交于 2019-12-04 11:54:39
问题 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 obtain an instance, no more XMPPConnection.getRoster)" First of all i am not able get the "Roster" object, libraries that i have imported may not have that package or i miss any lib here? I m using all the libraries mentioned in above link. Can

Retrieving offline messages using asmack

吃可爱长大的小学妹 提交于 2019-12-04 10:47:52
I'm new to asmack and openfire, looked a lot for a working answer to this but couldn't find it anywhere. How do I retrieve offline messages on Logging into my account on asmack? I've used the following code: configure(ProviderManager.getInstance()); //configuring providers before creating a connection ConnectionConfiguration connConfig = new ConnectionConfiguration(HOST, PORT); connConfig.setSendPresence(false); connection = new XMPPConnection (connConfig); try { connection.connect(); } catch (XMPPException ex) { setConnection(null); } try { connection.login(username, password); try {

Login exception SASL authentication failed using mechanism DIGEST-MD5 asmack in android

只谈情不闲聊 提交于 2019-12-04 10:16:45
I m try to connect with Xmpp server,But i m getting exception Login exception SASL authentication failed using mechanism DIGEST-MD5 i use this code ,can any one help me,or code try { if (xmppConnection == null) { ConnectionConfiguration config = new ConnectionConfiguration( SERVER_HOST, SERVER_PORT, SERVICE_NAME); xmppConnection = new XMPPConnection(config); System.out.println("xmppConnection"+xmppConnection); } if (!xmppConnection.isConnected()) { xmppConnection.connect(); System.out.println("Connecting"); } System.out.println("facebook id get xmpp "+username); if (!xmppConnection

Integrate Facebook chat in android with Asmack API

坚强是说给别人听的谎言 提交于 2019-12-04 08:12:35
问题 I try to implement chat support as suggested in this blog. Currently, I'm using following code to implement chatting interface. Java Code TestChatActivity.java import java.util.ArrayList; import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode; import org.jivesoftware.smack.PacketListener; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.filter

Can't establish a new connection with aSmack 4.0.2

空扰寡人 提交于 2019-12-04 04:53:45
问题 I'm learning Android programming and I've been trying to figure this out for a couple days now. I'm writing and Android app that is supposed to connect to XMPP server. I'm getting same error all the time and don't really know what I'm doing wrong. I've tried example codes found with google but can't manage to create a connection with them either. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Context