Android 2.3.3 で 相手 Bluetooth 機器のUUID を下記サイトを参考に調べていたら、
http://digitalhacksblog.blogspot.jp/2012/05/android-example-bluetooth-discover-and.html
公式API どおりに、BluetoothDevice.ACTION_UUID (API Level 15) を IntentFilter に追加する
ところを、リテラルに、
IntentFilter filter;
//
filter.addAction("android.bluetooth.device.action.UUID");
とすると、Broadcast 受信は、このスペルで受け取れない。
filter.addAction("android.bleutooth.device.action.UUID");
として、BroadcastReceiver で、
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if ("android.bleutooth.device.action.UUID".equals(action)) {
Parcelable[] uuidExtra = intent.getParcelableArrayExtra("android.bluetooth.device.extra.UUID");
for(int i=0;i < uuidExtra.length;i++){
out.append("\n Device: " + device.getName()
+ ", " + device
+ ", Service: "
+ uuidExtra[i].toString());
}
のように、、"bleutooth" で捕捉しないといけない。
しかし、、getParcelableArrayExtra で指定するのは、
正しいスペル "bluetooth" である。
手元に、API Level 15 の端末がなくて、15 でどうなのかまだわからない。