I would like to develop a BLE connection Library that I can distribute to my clients as an AAR.
The user interface attached needs to be created and handled all in the MainActivity. The library implementation and interface should be simple. I want to be able to give a third party the AAR module and the Mainactivity example project so that they can see which functions to call and how to do the implementation without me having to write pages of documentation. The functions in Mainactivity include the events for following:
Pair Button: Discover Bluetooth Devices and populates Listview or popup. Filter by Name entered in Bluetooth Name Filter Editbox. Connect and pair the selected device. The app should automatically connect to the paired device if the app starts up again in future or if the device goes out of range. Make the connection timeout and the reconnect timeout configurable in a setup function. After connection or automatic re-connection, send Command 2 automatically to the Bluetooth device once.
Write Command1 Button: Sends command 1 to the connected BLE device. Received commands is stored in a queue.
Write Command2 Button: Sends command 2 to the connected BLE device. Received commands is stored in a queue.
onReceiveBluetoothData: Store the data in a queue where the size of the queue can configurable. Make the queue 100 deep for now. If the queue is full, discard oldest value and store the new value in the queue. (FIFO)
Read Thread in Mainactivity: Check if new processed data is available from BLE if the BLE device is connected in a thread that runs every 500ms. The Read thread checks if new data is available, then populates Value 1 – Value5 and Checkboxes 1 -15 of the appropriate Result box. The result returned to mainactivity can be a class with all the possible received data. Use a queue of type class to store the received data.
I will need a document describing the software architecture. I need a document describing how to build the AAR file and how to transfer the file to 3rd parties. The full source code will be sent to us for testing in between phases. Payment only after satisfactory completing project.