Bluetooth device discovery

We will be only using the device discovery feature as this is the most stable part in the libraries on the Raspberry Pi. Also, there is only one mode available, which I will explain later. Let's close all tabs except for the Main class.

In the main method, have all the methods commented except for the runBluetoothDetectionExample(); method. Follow this method, which causes us to scroll down to the contents of this method:

    /**      * Runs the Bluetooth device discovery example.      */     private static void runBluetoothDetectionExample(){         BluetoothDevices example = new BluetoothDevices();         example.init();         try {             System.out.println("Starting device search,         please wait.");             example.runExample();  System.out.println("Search ...

Get Raspberry Pi 3 Projects for Java Programmers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.