Hi all
I hope you can help me.
I need to know if my bluetooth is visible, after assigning n seconds.
I can not find this property in BluetoothAdmin.
It would be something like:
From developer.android.com
public int getScanMode ()
Possible values are: SCAN_MODE_NONE, SCAN_MODE_CONNECTABLE, SCAN_MODE_CONNECTABLE_DISCOVERABLE.
• public static final int SCAN_MODE_NONE = Constant Value: 20 (0x00000014)
Therefore this device is neither discoverable nor connectable from remote Bluetooth devices.
•public static final int SCAN_MODE_CONNECTABLE = Constant Value: 21 (0x00000015)
•public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = Constant Value: 23 (0x00000017)
Indicates that both inquiry scan and page scan are enabled on the local Bluetooth adapter. Therefore this device is both discoverable and connectable from remote Bluetooth devices.
Maybe with Reflection?
Thanks
I hope you can help me.
I need to know if my bluetooth is visible, after assigning n seconds.
I can not find this property in BluetoothAdmin.
It would be something like:
B4X:
dim admin as BluetoothAdmin
If admin.getScanMode <> admin.SCAN_MODE_CONNECTABLE_DISCOVERABLE then
Dim i As Intent
i.Initialize("android.bluetooth.adapter.action.REQUEST_DISCOVERABLE", "")
i.PutExtra("android.bluetooth.adapter.extra.DISCOVERABLE_DURATION", 300)
StartActivity(i)
end if
From developer.android.com
public int getScanMode ()
Possible values are: SCAN_MODE_NONE, SCAN_MODE_CONNECTABLE, SCAN_MODE_CONNECTABLE_DISCOVERABLE.
• public static final int SCAN_MODE_NONE = Constant Value: 20 (0x00000014)
Therefore this device is neither discoverable nor connectable from remote Bluetooth devices.
•public static final int SCAN_MODE_CONNECTABLE = Constant Value: 21 (0x00000015)
•public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = Constant Value: 23 (0x00000017)
Indicates that both inquiry scan and page scan are enabled on the local Bluetooth adapter. Therefore this device is both discoverable and connectable from remote Bluetooth devices.
Maybe with Reflection?
Thanks