title: Bluetooth connection in foreground service
body: <p>I am developing an Android app for connecting to a Bluetooth device with callbacks for button presses. I want to add a foreground service that implements Bluetooth connectivity and gatt connection as well as having the bottom presses.</p>
  
  <p>And all this should happen even if the app is killed or closed.</p>
  
  <p>Edit:
  The question was a bit vague and not showing my efforts to solve it on my own. But as of 2 years now, it was already completed and accepted an answer from below</p>