Finishing off the Term
To conclude our progress in December and Term 1, we started by further refactoring our Bluetooth code to improve robustness. We then added comprehensive permmission checks to ensure the user has the required permissions enabled before using the app. Finally, we conducted a successful first test on a smart TV.
1. Tested Successfully On SONY Smart TV
We managed to successfully make a connection with a Smart TV. Then after testing we were able to control a mouse pointer on the TV and use the click buttons to open and use applications, such as Netflix and Disney+ on the Smart TV.
2. Added Permissions Check and Request on App Boot
The app needs to use Android location services and perform nearby devices scans. These are Android permissions which need to be specifically enabled by the user in the devices app settings. Upon app start we have added a check that makes sure that the user has these permissions enabled. If the check fails and the user doesn't have them enabled the app will then launch a popup on the screen and prompt the user to enable them.
If the user declines the request to enable permissions the app will launch a page that locks the main features of the app until the permissions have been enabled. There is a button on the page that the user can press to launch the prompt to enable permissions again.

3. Improved General Bluetooth Robustness
We have added checking that permissions are enabled and bluetooth is enabled before attempting connections or scans. Without these permissions enabled, trying to make a Bluetooth connection would cause the app to crash. This adds general error handing to reduce any points similar to this in which could cause any crashes of a similar nature.