Identify G1 Device Advertising Names and Pairing
mainG1 devices advertise with names following a specific pattern that allows the app to pair the left and right ears.
Naming Pattern
Names follow the format: G1_{channel}_{side}_{id} (e.g., G1_45_L_92333 and G1_45_R_xxxx).
Pairing Logic
- The app scans for devices matching the
G1prefix. - It splits the name by underscores (
_) to extract the channel number. - A paired set is only recognized when both a Left (
_L_) and a Right (_R_) device with the same channel number are found. - When a pair is found, the native layer notifies Flutter with a map containing
leftDeviceName,rightDeviceName, andchannelNumbervia thefoundPairedGlassesmethod.