Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Warning : ANT SDK not suitable for realtime applications

Rank

Total Posts: 19

Joined 0

PM

There's a problem with the ANT SDK that means that it's not really suitable for any Android App that needs realtime access to incoming ANT messages.

The problem is that AntChannel objects buffer incoming ANT messages and then periodically (once every 2 seconds) pass on the ANT messages to channel users (via the function onReceiveMessage)

This means that any time based application only knows when ANT messages were sent/received at a 2 second resolution.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

When using the ANT SDK, you can change the default behaviour by using the ConfigureEventBufferMessage.      
Rank

Total Posts: 19

Joined 0

PM

Alejandra, that sounds like what I'm after.

The DISABLE_EVENT_BUFFERING static property on the ConfigureEventBufferMessage class seems relevant but I don't know how to make use of this.

Do you have any guidance?

Thanks      
Rank

Total Posts: 19

Joined 0

PM

Calling disableEventBuffer on the AntChannel object fixes the problem!

Events are now being received in realtime.

Thanks      
Rank

Total Posts: 3

Joined 2017-07-17

PM

thanks guys for sharing your ideas...      
Rank

Total Posts: 8

Joined 0

PM

How do we get a AntChannel to change the settings?

Up to now I only used the ANT+ SDK, but I want to receive messages at a higher interval (0.25ms).      
RankRankRankRank

Total Posts: 210

Joined 2012-06-27

PM

Have you tried "disableEventBuffer"? If you want a buffering interval that is shorter than the default, but longer than the channel period, then you may want to try "setEventBuffer" from https://www.thisisant.com/APIassets/Android_ANT_API/com/dsi/ant/channel/AntChannel.html      

Signature

Ian Haigh