2017-06-25 17 views

答えて

0

あなたは電話を避けるためにこれを試すことができます。

if (device.getBluetoothClass().getMajorDeviceClass() != BluetoothClass.Device.Major.PHONE) { 
     // do something 
    } 

PLSがBluetoothClass.Device.Majorを見てuは

public static class Major { 
     private static final int BITMASK   = 0x1F00; 
     public static final int MISC    = 0x0000; 
     public static final int COMPUTER   = 0x0100; 
     public static final int PHONE    = 0x0200; 
     public static final int NETWORKING  = 0x0300; 
     public static final int AUDIO_VIDEO  = 0x0400; 
     public static final int PERIPHERAL  = 0x0500; 
     public static final int IMAGING   = 0x0600; 
     public static final int WEARABLE   = 0x0700; 
     public static final int TOY    = 0x0800; 
     public static final int HEALTH   = 0x0900; 
     public static final int UNCATEGORIZED  = 0x1F00; 
    } 
たいものを選びます
関連する問題