smack

Java and Jabber/Smack [closed]

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to code a simple example using the latest version of Smack (3.2.1) to send and receive messages between two accounts. Connection connection = new XMPPConnection("jabber.org"); connection.connect(); connection.login("username", "password"); But I can't even get past the login part. When I run the above code I get this exception: Exception in thread "main" SASL authentication DIGEST-MD5 failed: invalid-authzid: at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:337) at org.jivesoftware.smack

How to authenticate to Google Talk with AccountManager's authentication token using Smack API?

别来无恙 提交于 2019-12-03 06:43:48
This question is similar to: Authenticate to Google Talk (XMPP, Smack) using an authToken I have android.accounts.AccountManager class and its methods to get authentication token for Google account: public AccountManagerFuture<Bundle> getAuthToken (Account account, String authTokenType, Bundle options, Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) I know how to prepare authentication XML: jidAndToken ="\0" + UTF8(YOURUSERNAME@gmail.com) + "\0" + Auth (where "\0" is intended to be a single octet with value zero). Use this in the initial SASL auth: <auth xmlns='urn

SmackInitialization: Could not determine Smack version

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am making an android plugin for Unity, I need to integrate XMPP in Unity so first I am trying to create a connection of XMPP and send and receive a message. It's working fine in android, I am able to send and receive message But when I export .jar file and use in Unity so I got below error while I create connection SmackInitialization: Could not determine Smack version java.lang.NullPointerException: lock == null at java.io.Reader.<init>(Reader.java:64) at java.io.InputStreamReader.<init>(InputStreamReader.java:122) at java.io

File Transfer not working smack 4.1 android

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Currently I am playing around with the new Smack 4.1 that offers full support for android. Sending and receiving messages is no problem, works fine. But now, I get stuck on sending and receiving Files. For example: Send File public void sendFile(String fileName,String to){ if(transferManager==null) { transferManager = FileTransferManager.getInstanceFor(mConnection); } OutgoingFileTransfer transfer = transferManager.createOutgoingFileTransfer(to); try { transfer.sendFile(new File(fileName), "This is a Test!"); } catch (SmackException e) { e

Error on smack 4.2.0 : IN AAAA yielded an error response NX_DOMAIN

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i start openFire and test it with spark everything is ok but when i try to connect with smack 4.2.0 in android studio i got this error: Ljavax/naming/directory/InitialDirContext; and my dependencies is this: compile "org.igniterealtime.smack:smack-java7:4.2.0" compile "org.igniterealtime.smack:smack-tcp:4.2.0" compile "org.igniterealtime.smack:smack-im:4.2.0" compile "org.igniterealtime.smack:smack-extensions:4.2.0" compile "org.igniterealtime.smack:smack-android-extensions:4.2.0" compile "org.igniterealtime.smack:smack-bosh:4.2.0" when

FileTransfer using XmppFrameWork in ios

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: i have implemented some code of file transfer by using this tutorial : Please Click Here. and the code which i am using : - ( void ) sendToOtherDevice :( NSData *) fileData receiverJid :( NSString *) receiverJid { XMPPJID * jid = [ XMPPJID jidWithString : receiverJid ]; XMPPSIFileTransfer * sifiletransfer = [[ XMPPSIFileTransfer alloc ] init ]; [ sifiletransfer initiateFileTransferTo : jid withData : fileData ]; NSString * s = [ NSString stringWithFormat :@ "%@/spark" , receiverJid ]; NSString * jabbarID = [[[[ self appDelegate ]

Smack 4.1 Android anonymous registration to Openfire

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want connect anonymously to openfire server with Android Smack 4.1 client and register the new user (username = "wq", password="wq") with AccountManager, and then disconnect and login as non-anonymous registered user. 3.1.1 Registration with a Server Special care must be taken when an unregistered entity interacts with a server rather than a service. Normally, a server enables in-band registration so that entities can "bootstrap" their participation in the Jabber network; this bootstrapping happens when an unregistered and

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

帅比萌擦擦* 提交于 2019-12-03 01:28:01
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 exception. Smack received support for XEP-0184 with SMACK-331 . You can't use Smack < 4.1 directly under Android, you need Smack 4.1 (or higher). You can read more about Smack's XEP-0184 API in the javadoc of DeliveryReceiptManager . Yes this works with normal Smack. Gradle Dependencies compile "org.igniterealtime.smack:smack-android:4.1.0" compile

GCM using smack library NoResponseException: No response received within reply timeout

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to gcm and I tried to connect to Cloud Connection Server(XMPP) of GCM using Smack API. It was alright at the start, My code: uid = "123456789"; apiKey = "A**************B"; XMPPTCPConnectionConfiguration.Builder config; config.setSocketFactory(SSLSocketFactory.getDefault()); config = XMPPTCPConnectionConfiguration.builder(); config.setUsernameAndPassword(uid,apiKey); config.setServiceName("gcm.googleapis.com"); config.setHost("gcm.googleapis.com"); config.setPort(5235); config.setDebuggerEnabled(true); mConnection = new

What is the difference between Smack and aSmack?

风格不统一 提交于 2019-12-03 00:46:18
I am not able to use Smack on Android whereas aSmack works perfectly? When compared the source code it looks somewhat similar, where does the difference comes from? What is the difference between Smack and aSmack? Smack < 4.1 does not work on Android, mostly because of APIs missing on Android (e.g. most of the javax APIs). That is the reason the aSmack build environment was born. It is a way to modify Smack so that it can be used on Android. Besides many minor changes the biggest changes are Disabling XMPP SASL auth methods that are not supported on Android Using apache harmony for SASL