fill Bluetooth Parcel Uuids - Android Bluetooth

Android examples for Bluetooth:Bluetooth Parcel

Description

fill Bluetooth Parcel Uuids

Demo Code


//package com.java2s;
import android.bluetooth.BluetoothDevice;

import android.os.ParcelUuid;
import android.util.Log;

import java.util.ArrayList;
import java.util.Collections;

public class Main {
    private static final String TAG = "BluetoothUtils";
    private static final boolean D = true;

    private static void fillParcelUuids(BluetoothDevice device,
            ArrayList<ParcelUuid> result, ParcelUuid[] phoneUuids) {
        if (phoneUuids != null && phoneUuids.length > 0) {
            Collections.addAll(result, phoneUuids);
        } else {/*  w  w  w .j av  a  2s. com*/
            if (D)
                Log.d(TAG,
                        "fillParcelUuids() with no uuids for "
                                + device.getName());
        }
    }
}

Related Tutorials