Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

To Receive and Display Channel ID

Rank

Total Posts: 22

Joined 2015-01-28

PM

Hi,
I am developing android app and there is requirement to display channel id(device number) of ant device.
how can i do this?

I have done this in windows application .the relative code for the same is as below

ANT_Channel channel1 = device0.getChannel(1);
ANT_Response IDresp = channel1.getParentDevice().requestMessageAndResponse(1, ANT_ReferenceLibrary.RequestMessageID.CHANNEL_ID_0x51, 500);

threadSafePrintLine("Received Channel ID:" + Environment.NewLine + "Dev#: " + ((IDresp.messageContents[2] << 8) + IDresp.messageContents[1]) + ", DevType: " + IDresp.messageContents[3] + ", TransType: " + IDresp.messageContents[4], textBox_Display);


Thanks.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

The Android Channel API gives you access to the ANT Channel ID through a method (requestChannelId) which returns a ChannelIdMessage object.

Cheers      
Rank

Total Posts: 2

Joined 2019-01-09

PM

Harrison - 22 October 2015 07:23 PM
Hi,

The Android Channel API gives you access to the ANT Channel ID through a method (requestChannelId) which returns a ChannelIdMessage object.

Cheers


Thanks for this valuable information.its really working.very helpful for us.thanks once again..!!      

Signature

Hi, I am Riya Rathi, working on android platform. I am work with best android development firm CRBtech Solution. We can provide the android development online training  in Pune. The android development has achieve most prominent position in the market.