Closed GoogleCodeExporter closed 8 years ago
Asmack doesn't come with auto-registration for packet extensions. You have to
register the classes.
You may steal the code from
[http://code.google.com/p/buddycloud/source/browse/trunk/client/android/main/src
/com/buddycloud/jbuddycloud/BuddycloudClient.java#49
Buddycloud] or rewrite the
[http://github.com/rtreffer/smack/blob/master/build/resources/META-INF/smack.pro
viders smack
xml config].
Original comment by rtreffer@gmail.com
on 6 Apr 2010 at 9:07
I'm too incompetent at using the reply box, but the problem should be solved.
Don't
hesitate to open up a new issue when you run into problem :-)
Original comment by rtreffer@gmail.com
on 6 Apr 2010 at 9:09
Hi rtreffer,
Are you going to add a patch to asmack that manually register all the packet
extension available on smack, so that other users of your library won't have to
face
this issue?
Are there any drawbacks if I register all the packet extension, even if I don't
use
some packet?
Does Buddycloud register all the packet extension or only a part of packet
extension
of smack?
Best regards,
Stefano "Kismet" Lenzi
Original comment by kismet...@gmail.com
on 7 Apr 2010 at 9:02
I'm trying to use only the needed extensions, as XMPP is mainly running as a
background service, meaning a memory leak might be fatal.
Besides that: I'm seeing several missuses of the lib, but I'll not try to solve
all
of them in the lib. I'll try to create a simple sample app with all the bits
needed.
This should help as a kickstartet for others.
Regards,
René
Original comment by rtreffer@gmail.com
on 7 Apr 2010 at 11:12
Hi Renè,
Does it means that asmack aims at be a system Service and that android
Application
(may I say Activities) should interact with asmack by means of Intent?
Original comment by kismet...@gmail.com
on 7 Apr 2010 at 1:07
It's just a lib. Which is "usually" used inside a service. The service writes
to a
content provider, and activities that attach to these content providers.
That's the way most xmpp apps are modeled atm.
That said asmack is (right now) jast the xmpp library :-)
Original comment by rtreffer@gmail.com
on 7 Apr 2010 at 2:05
I downloaded last source from repository and patched, some patch manually....
but im
getting the same problem..(CastException) in getNode.
How can i fix this ?
Original comment by one2one....@gmail.com
on 15 Apr 2010 at 12:14
As I've said you should track the connection process and make sure the
pubsubmanager
is registered (together with the pubsub elements). I'm actually doing pubsub
all the
time, for buddycloud. It's definetly working once the IQProviders are
registered.
The ProviderManager must be able to resolve the pubsub items/namespaces. You'll
otherwise end up with a generic packet that can't be casted (obviously).
Have a look at this static bock on how to do it:
http://code.google.com/p/buddycloud/source/browse/trunk/client/android/main/src/
com/buddycloud/jbuddycloud/BuddycloudClient.java#45
You should register anything from the pubsub namespace and from
org.jivesoftware.smackx.pubsub.
This has to happen before you try to connect to the server.
Original comment by rtreffer@gmail.com
on 15 Apr 2010 at 12:35
Hi one2one,
I don't know if you resolved your problem but you can copy and paste the code
that
you find attached to comment #14 of the issue #9 [1] to initialize ASmack to
support
XEP-0060: Publish-Subscribe
Ciao,
Stefano "Kismet" Lenzi
[1] - ASmack initalization for enabling support fo XEP-0060 -
http://asmack.googlecode.com/issues/attachment?aid=1025499906583360115&name=asma
ck.initialization.java
Original comment by kismet...@gmail.com
on 22 Apr 2010 at 1:36
Everytime I try to get a node, I get item-not-found. Even when I create the
node before, and I get no errors.
Can you help me? Almost all the links that you posted are down.
Thanks.
Original comment by eng.prud...@gmail.com
on 3 Dec 2011 at 5:32
The above issue is resolved using the help i got from this site.
http://community.igniterealtime.org/message/201866#201866
use the code in above site to register all the providers
also Servicediscoverymanager was returning null which was causing problem
so i replaced
ServiceDiscoveryManager discoManager
=ServiceDiscoveryManager.getInstanceFor(connection);
with
ServiceDiscoveryManager discoManager = new ServiceDiscoveryManager(connection);
Original comment by sheraz.khilji@maavratech.com
on 24 Apr 2012 at 2:04
Original issue reported on code.google.com by
el3t...@gmail.com
on 6 Apr 2010 at 3:24Attachments: