【发布时间】:2015-03-21 19:28:40
【问题描述】:
有没有办法让我的应用程序在应用程序运行的一段时间内可被发现?我试着这样做
Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0);
startActivityForResult(discoverableIntent, DISC_DURATION);
如 Android Developers 上所示,但 0 的持续时间不起作用,因此设置了默认值 120。有没有办法让它一直可见?
【问题讨论】:
标签: android bluetooth discoverability