After implementing my version of PacketExtension and PacketExtensionProvider class and putting a call to fooExtensionProvider.install() which calls “ProviderManager.addExtensionProvider(“x”,“pando:test”,new PandoPacketExtensionProvider());” at the beginning of my main. The following snip in my subclassed PacketListener:
FooPacketExtension pandoMes = (FooPacketExtension) packet.getExtension(“x”,“xyz:test”);
if(pMes!=null){
// for debug:
System.out.println("+Get the From+++" + pMes.getFrom() + “+++++++++++++++++”);
}
evaluates pMes to null, it seems like it only has the HTML extension provider and the new FooExtensionProvider is not being loaded? I am not getting any message yet but would have expect this to be not null.
I do not have a provider.smack file but am relying on FooPacketExtensionProvider method
public static void install(){
ProviderManager.addExtensionProvider(“x”,“xyz test”,new FooPacketExtensionProvider());
}
to install the FooPacketExtentionProvider
What I’'m unsure about is where the FooPacketExtension is loaded so it can be retrived by packet.getExtension(“x”,“xyz:test”)? Is there suppose to be an explicte packet.addExtension() call, I thought this was handled automatically?
Any thoughts you had would be a large help, I’‘m sure I’‘m overlooking something simple but at the moment I’'m kind of stumped.
thanks