Hi,
Ive got the ANT Sample_AcquireChannels app compiling, running on the Android tablet and talking to ANTware.
I have stripped back the UI to the bare bones to work out what I need to add into my own application to support ANT.
Rather than have a button to open a channel, I want to do this as soon as my app starts up. So I added the "addNewChannel(mCreateAntChannelAsMaster);" line into the end of the onServiceConnected function. At this point I had assumed that everything is setup and ready to run. However probably 1 in 5 times it doesnt work and after debugging into the code, I found that in ChannelService.java in createNewChannel, I enter the following IF statement.
if(null == antChannelController)
{
Log.e(TAG, "null == antChannelController");
return null;
}
So my question is, how should i open up the ANT channel without user intervention? Do I just wait one second until after the connection to the service or is there a better way?