문제

I am writing a security application for Laptops and I began writing the DiscoveryListener in J2ME But it displays all device types like mobiles. But I want it to find only computers.

Any help regarding this???

도움이 되었습니까?

해결책

There's no way to search for a specific device type. The search itself will always find all device types.

You will have to filter out unwanted devices yourself. When a device is found, deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) is called. The DeviceClass tells you what kind of device it is. So simply ask.

if (cod.getMajorDeviceClass()==0x100) // Yes, it's a computer of some sort.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top