Skip to main content
All CollectionsPortal Pages
Design | Messaging | Messaging
Design | Messaging | Messaging
Jason Liang avatar
Written by Jason Liang
Updated over 4 years ago

brainCloud messaging is a one-to-one conversation in general. That means the profile Id of receivers must be explicitly designated when sending messages out. That is different from chat which messages are accessible to everyone who connects to a chat channel.

Messages persist over time. They can be retrieved later if the receiver may not be online at the time they are sending. The paradigm is similar to email, but messages stay within your app.

Configs messaging service:

Go get started, find the Configure Messaging page on brainCloud portal.

  • Enable messaging service for your app by checking the first checkbox. Fill in all the required fields respectively. Click the Save button to complete your configuration.

Test:

  • Download the Unity test example from here. Unzip it and open it with Unity Hub.

  • Test from the editor as below or build it into any platform that fits your test device.

  • Logging your app from brainCloud setting tab:

  • Run the game, fill in the [User Name] and [Password] input fields with any words you prefer, and click Auth button, you will see the success return like below, note down the profileId you got from the response.

  • Go to brainCloud portal login the same app as above, find page Design | Cloud Code | API Explorer, authenticate with a different user from above.

  • Select Messaging Service and SendMessageSimple Operation, put the profileId you got from the Unity app as the receiver id.

  • Switch back to your Unity app, click getMessages button, to check if the user received the message which was sent from brainCloud portal.

  • Now, let test on-line messaging with RTT enabled. Before testing, make sure your app has been configured as RTT enabled.

  • Click enableRTT button from your Unity app, you should see the return as below with RTT connect success info.

  • Switch back to brainCloud portal, send a new message to this profiled again:

  • You should find your Unity app return message is auto refreshed with this new message:

Did this answer your question?