Hi, I have been having trouble getting VCards to work. Saving my own VCard seems to work fine, however when trying to retrieve the VCard for another user, I get this error:
XMPPError: feature-not-implemented - cancel
Are VCards currently operational or is it still unimplemented?
Are there alternatives to VCards? I would like to query the server for information on a particular user when another user wants to look at their profile.
ProviderManager pm = new ProviderManager();
pm.addIQProvider("vCard", "vcard-temp", new VCardProvider());
The error that I receive is this:
W/System.err﹕ org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: feature-not-implemented - cancel
W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:213)
W/System.err﹕ at org.jivesoftware.smackx.vcardtemp.VCardManager.loadVCard(VCardManager.java:125)
W/System.err﹕ at app.example.com.connections.LoginFragment.loadvCard(LoginFragment.java:147)
W/System.err﹕ at app.example.com.connections.LoginFragment$3.onClick(LoginFragment.java:81)
W/System.err﹕ at android.view.View.performClick(View.java:4754)
W/System.err﹕ at android.view.View$PerformClick.run(View.java:19605)
W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:733)
W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err﹕ at android.os.Looper.loop(Looper.java:146)
W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5752)
W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
Just to clarify, I’m able to get my own vCard using the loadVCard() method, but trying to query for another person’s VCard still yields the same result feature not implemented result.
I figured out the error. The JID being reported to me was user@example.com/Smack. I thought that this was the JID to query the server and the isSupported method said that it was supported. According to the Debug, it was sending it back as user@example.com. I wouldn’t have known that if I hadn’t enabled debugging. Thanks Flow, I wouldn’t have figured that out if you hadn’t suggested enabling debug (I didn’t know that existed). Thank you for your help!