Send Test Messages

We are now ready to send some test messages.

Open the application menu on the developer portal and select the Push icon like below:

Select the 'New Message' and input the following information:

  1. Set the receiver to 'User'.
  2. Select 'Login Name' in the pull-down menu and enter the target user's name (user1). This is the user who was logging in when the initialization method KiiUser.pushInstallation().installMqtt() is executed.
  3. Set up custom data as required. For example, set Hello in the mymessage field as mentioned in the previous topic.
  4. Turn on the "MQTT".
  5. Click the "Confirm" button.

You should see the message on the browser right after you click the "Confirm" button.

If the message is not displayed, check the JavaScript console for any error messages and if the application that you manipulate on the developer portal is configured in your Web app with the AppID assigned by Kii Cloud.

Note that Kii Cloud only supports one MQTT connection per user. If multiple instances of a Web app are launched at the same time, only one connection can be established.

Some MQTT libraries repeatedly disconnect and reconnect a connection when multiple instances of a web app are launched at the same time. Implement logic to check the reconnection frequency and throw a connection error in the web app as required.

Let us move to the final topic: What's Next?


<< Implement Receive Processing What's Next? >>