mirror of
https://github.com/inthehand/32feet.git
synced 2026-10-18 14:35:36 +08:00
23 lines
569 B
C#
23 lines
569 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using InTheHand.Bluetooth;
|
|
|
|
namespace InTheHandBLETest
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
var discoveryTask = TestDeviceDiscovery();
|
|
discoveryTask.Wait();
|
|
}
|
|
|
|
private static async Task<bool> TestDeviceDiscovery()
|
|
{
|
|
var discoveredDevices = await Bluetooth.ScanForDevicesAsync();
|
|
Console.WriteLine($"found {discoveredDevices?.Count} devices");
|
|
return discoveredDevices?.Count > 0;
|
|
}
|
|
}
|
|
}
|