What is the difference between Smack and aSmack?

爱⌒轻易说出口 提交于 2019-12-03 10:03:53

问题


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?


回答1:


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

  1. Disabling XMPP SASL auth methods that are not supported on Android
  2. Using apache harmony for SASL instead of the javax API

Make sure to read the README and and init the relevant code before doing any XMPP related actions.

More information can be found @ https://github.com/Flowdalic/asmack/wiki/Modifications




回答2:


As the project description states, ASmack adds a set of patches to regular Smack. Check this conversation for further details.

Regards.




回答3:


You can see how things are done in talkmyphone. I think they are using smack with android.




回答4:


It modifies Smack to allow it to work on Android.

I am not sure of what those changes are, with the exception of altering the ProviderManager mechanism so that it can load the smack.providers XML file from an Android friendly directory. By default Smack loads this from its own resource directory, which is not reachable in Android.



来源:https://stackoverflow.com/questions/3933238/what-is-the-difference-between-smack-and-asmack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!