Nordic Semiconductor has recently published a great downloadable guide on programming Bluetooth LE and hence Beacons on Android. It covers Android permissions, scanning and how the API varies across versions Android 4, 5 and 6. There’s are also a section on GATT connections and how to use Android as a GATT Server.