CHAPTER 5 ■ IOT PATTERNS: REALTIME CLIENTS
As shown in Figure 5-20 , select App from the Add to Module option. Click OK and
switch back to the Android view.
Figure 5-20. Add libraries to app module
Next you are going to write code to communicate with the MQTT broker. As shown in
Figure 5-21 , right-click on the top-level package (in the example, it is com.codifythings.
intrusiondetectionsystem ) and choose New ➤ Java Class.
Enter MQTTClient in the Name field and click OK, as shown in Figure 5-22.
Figure 5-21. Add a new class
Figure 5-22. Enter new class name