This app is built for course Product Realization at NIT Uttarakhand.
• Connection to HC-05 Bluetooth module to be installed in switchboards have been established. • The app is able to get a list of paired Bluetooth device through BluetoothAdapter’s getBondedDevices() function and display it through a dynamic adapter. • All the different screens in android are known as activities: The following activities are present in the current version of the app. 1) DeviceListActivity – This activity presents the user with a list of paired Bluetooth devices along with their MAC addresses. A user can pick a switchboard device of their choice, and then the MAC address of that particular device is passed in with an ‘Intent’ to launch MainActivity. An ‘Intent’ in android development is used to open other activities and transmit data between activities using key-value pairs. 2) MainActivity – This activity allows the user to control various appliances wirelessly through switches displayed on the screen. In the background, this activity establishes a connection with HC-05 Bluetooth module (by making use of MAC Address passed in along with ‘Intent’) connected to Arduino. It sends letters (A/B/C/D) as commands to Arduino whenever switches on the screen are turned on or off. Moreover, it also saves the MAC Address in ‘Shared Preferences’ provided by the Android framework for storing app’s settings; so that user don’t need to pick a Switch Board each time the app is relaunched. 3) ConnectingView – This view prevents the app from lagging and shows up whenever MainActivity is busy creating sockets for Bluetooth connection in the background using AsyncTask. An ‘AsyncTask’ is used for carrying out background processes in a separate thread that take a long time for execution, which prevents the app’s user interface from lagging.