using Toybox.Ant;
var channelType = Ant.CHANNEL_TYPE_RX_NOT_TX // Bidirectional Receive (Slave)
var network = Ant.NETWORK_PUBLIC; // Ant public network
// Get the channel
channelAssign = new Ant.ChannelAssignment(channelType, network);
// Initialize the channel - assumes message callback method
GenericChannel.initialize(method(:onMessage), channelAssign);
Clearly Generic.Channel.initialize() can't be called directly; this should be replaced with a call to new GenericChannel.
https://developer.garmin.com/connect-iq/api-docs/Toybox/Ant/ChannelAssignment.html