我的应用程序持有带有特定UUID的打开的蓝牙服务器套接字,以便其他设备连接和传输文件。我对BroadcastReceiver有点困惑。
在扩展Activity的类中,我想检查蓝牙适配器的状态。但是我的BroadcastReceiver从来没有触发过。我试着以这种方式使用BroadcastReceiver:
public class MainClass extends Activity {
public void onCreate(Bundle b) {
super.onCreate(b);
IntentFilter filter = new IntentFilter(Bluetoo