Play audio file on device over bluetooth 5.0
I am looking for guidance on steps to play an audio file over bluetooth 5.0. This will mainly be an android project but I would like to do as much as I can cross platform so I can port to IOS at some point. Some basic requirements are as follows:
When connect button in app is pressed check if a certain BT 5.0 device is connected or not. If not connect to the device.
In my application I have a handful of audio files (WAV) that will be stored on the tablet running the app. When certain buttons are pressed I need to play a specific audio file to the connected BT 5.0 device. I need to be able to pause, stop, and start the audio file.
The part of the project I need guidance on is creating the connection to the BT device (B06 from 1mii). Then streaming the audio to that device.
I looked at Mediamanager library but I could only find where you can push audio to the line out or speaker of the device. I could not find anywhere that explains how to push audio over BT using this library.
Some additional information is that the device will already be paired manually before running the application so its profile will already be saved in the device before running the application.