powered by Jive Software

Carboncopy listener isn't working

CarbonCopyReceivedListener isn’t working.

carbonManager = CarbonManager.getInstanceFor(connection);
carbonManager.addCarbonCopyReceivedListener(carbonCopyReceivedListener);

Then when I’m sure that the user is connected and authenticated, I called:

try {

carbonManager.enableCarbons();
} catch (XMPPException e) {

e.printStackTrace();
} catch (SmackException e) {

e.printStackTrace();
} catch (InterruptedException e) {

e.printStackTrace();
}

This should log any received carbon stanza:

CarbonCopyReceivedListener carbonCopyReceivedListener = new CarbonCopyReceivedListener() {

@Override
public void onCarbonCopyReceived(CarbonExtension.Direction direction, Message carbonCopy, Message msg) {

Log.d(“carboooooooooooooon”, carbonCopy.getBody());

}

};

I can see the messages (I sent from another client) in the log (both sent and received), but the carboncopylistener isn’t picking up any of the stanzas at all.

I’m using 4.2.0-rc3-SNAPSHOT

Please show the full stanza you see in the logs.

When sending message from a different device (different resource):

02-01 03:34:10.585 8479-8515/com.app.cp D/SMACK: RECV (0):

hi

When receiving message from a participant:

02-01 03:35:35.006 8479-8515/com.app.cp D/SMACK: RECV (0):

hello

As you can see , I am receiving the stanzas all right, but the carbonlistener just isn’t picking it up, at all. Neither.

I’ve uploaded a new snapshot. Please try and report back if it fixes the issue for you.

1 Like

Working Fine now with the new changes to the snapshot. Much appreciated.