question: private void queueAlarm ( Alarm alarm , TransactionBuilder builder , BluetoothGattCharacteristic characteristic ) { Calendar calendar = alarm . getAlarmCal ( ) ; int daysMask = 0 ; int maxAlarms = 5 ; if ( alarm . getIndex ( ) >= maxAlarms ) { if ( alarm . isEnabled ( ) ) { GB . toast ( getContext ( ) , "Only 5 alarms are currently supported." , Toast . LENGTH_LONG , GB . WARN ) ; } return ; } if ( alarm . isEnabled ( ) ) { daysMask = alarm . getRepetitionMask ( ) ; } byte [ ] alarmMessage = new byte [ ] { ( byte ) 0x2 , ( byte ) ( 128 + alarm . getIndex ( ) ) , ( byte ) calendar . get ( Calendar . HOUR_OF_DAY ) , ( byte ) calendar . get ( Calendar . MINUTE ) , ( byte ) daysMask } ; builder . write ( characteristic , alarmMessage ) ; }
target:  Convert an alarm from the GB internal structure to a Mi Band message and put on the specified builder queue as a write message for the passed characteristic