package com.example.anders.flexsensor.ble;

import java.util.HashMap;
import java.util.UUID;

/**
 * Sample GATT attributes
 */

class GattAttributes {
    private static final String baseBluetoothUuidPostfix = "0000-1000-8000-00805F9B34FB";
    private static HashMap<String, String> attributes = new HashMap<>();
    static String BATTERY_LEVEL = uuidSStringFromUInt16("2A19");

    static {
        attributes.put(uuidSStringFromUInt16("180F"), "Battery Service");
        attributes.put(BATTERY_LEVEL, "Battery Level");
    }

    static String lookup(String uuid, String defaultName) {

        String name = attributes.get(uuid);
        return name == null ? defaultName : name;
    }

    private static String uuidSStringFromUInt16(String shortCode16) {
        return "0000" + shortCode16 + "-" + baseBluetoothUuidPostfix;
    }
}

@@ -229,15 +229,15 @@
 0805
-F9B34FB
+f9b34fb
 %22;%0A 
@@ -377,148 +377,425 @@
 %22);%0A
-%0A    static %7B%0A        attributes.put(uuidSStringFromUInt16(%22180F%22), %22Battery Service%22);%0A        attributes.put(BATTERY_LEVEL, %22Battery Level
+    static String APPARENT_WIND_DIRECTION = uuidSStringFromUInt16(%222a73%22);%0A%0A    static %7B%0A        //Services%0A        attributes.put(uuidSStringFromUInt16(%22180F%22), %22Battery Service%22);%0A        attributes.put(uuidSStringFromUInt16(%22181a%22), %22Environmental Sensing%22);%0A%0A        //Characteristics%0A        attributes.put(BATTERY_LEVEL, %22Battery Level%22);%0A        attributes.put(APPARENT_WIND_DIRECTION, %22Apparent Wind Direction
 %22);%0A

Add new service