Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.List; import java.util.UUID; import android.bluetooth.BluetoothGattService; public class Main { public static BluetoothGattService findService(UUID uuid, List<BluetoothGattService> gattServices) { if (gattServices == null) return null; for (BluetoothGattService gattService : gattServices) { if (uuid.equals(gattService.getUuid())) { return gattService; } } return null; } }