Page 1 of 1

How to send messages between addons?

Posted: Thu May 06, 2021 2:24 am
by blk
Hi,

Is there an official way via the API to send messages between 2 different addons? I'm trying to avoid TCP calls as I'm using the Simplified API.

Thanks,
 

Re: How to send messages between addons?

Posted: Thu May 06, 2021 11:56 am
by Svyatoslav
Hi,
Yes, just use Layer1ApiUserInterModuleMessage. Send it down the stack, then catch it when it goes back up. You just need to subscribe to core API as Layer1ApiAdminListener using Api#getProvider#addListener

Re: How to send messages between addons?

Posted: Thu May 06, 2021 3:39 pm
by blk
Hi,

Thanks for your reply. I was able to figure it out based on your message.
 

Re: How to send messages between addons?

Posted: Fri May 07, 2021 8:08 am
by Andry API support
Hi, for Core API you may implement the MessageListener interface to receive messages.