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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.