I need to search for bluetooth devices inside a bounded service using the startdiscovery function. For this you need to install a broadcast receiver inside the service. But this requires getting the context, and the bound service does not have it. Static creation of the receiver through the manifest also requires ultimately the presence of context in the receiver.
<receiver android:name=".SingBroadcastReceiver" android:exported="true"> <intent-filter> <action android:name="android.intent.action,ACTION_FOUND"/> </intent-filter> </receiver> Is there a way to do this in a tied service?