Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

New ANT+ Android SDKs (vP.B4) including FE-C (Bike Trainer) support

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

v.P.B4 of the Android ANT+ SDK was released at the end of March, along with ANT+ Plugins Service 3.5.0 releasing live to the Play Store.

The ANT SDK remains at v.C.B5.

This was primarily a bug release, so we released it live as soon as it was available. Additionally, the Fitness Equipment Controls profile (which supports Bike Trainers) has graduated from the member early release to be available in the public API.

As always the full changelog can be viewed in the readme, which is viewable online through Github: https://github.com/ant-wireless/ANT-Android-SDKs/blob/master/ANT+_Android_SDK/README.md


Feel free to leave feedback on the SDKs here including bug reports or feature requests.      

Signature

Dynastream Developer

Rank

Total Posts: 1

Joined 2017-03-27

PM

I have a bug to report. I am using the asynchronous scan for devices, which works as I expect if I have all my dependencies installed. However if I do not, I get a Null Pointer Exception:
Caused byjava.lang.NullPointerExceptionAttempt to invoke interface method 'void 
com.dsi.ant.plugins.antplus.pccbase.AsyncScanController$IAsyncScanResultReceiver
   .onSearchStopped(com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult)' 
on a null object reference
   at com
.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAsyncScan_Helper_SubMain(AntPluginPcc.java:532)
   
at com.dsi.ant.plugins.antplus.pcc.controls.pccbase.AntPlusBaseRemoteControlPcc.requestAccessRemoteControl_Helper(AntPlusBaseRemoteControlPcc.java:355)
   
at com.dsi.ant.plugins.antplus.pcc.controls.AntPlusVideoRemoteControlPcc.requestRemoteControlAsyncScanController(AntPlusVideoRemoteControlPcc.java:122)
   
at com.example.dario.virbconnector.CameraSelectionActivity.onCreate(CameraSelectionActivity.java:36


It is caused by the method requestAsyncScan_Helper_SubMain in the class AntPluginPcc. It tries to call onSearchStopped(...) on the field scanResultReceiver, which is Null. I have tracked the problem back to the fact, that the IAsyncScanResultReceiver I pass to the constructor AntPlusVideoRemoteControlPcc.requestRemoteControlAsyncScanController(...) is being assigned to the field remoteResultReceiver, but not to the field scanResultReceiver of the AsyncScanController.

I hope I was able to explain what my problem is.

If this is a known bug, is there any workaround?

Thank you in advance for your help. If I can provide any more information I will gladly do so.

Edit: Added line break to code because it overflowed out of the page      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Thanks for your report, I see the error. The dependency version check error assumes the remote scan controller has a basic scan controller callback and the inheritance wasn't set up to expect that properly.

The same error occurs with async controller for Bike Speed and Cadence sensors as well, in case someone ends up here using those.

The recommended approach is to use the MultiDeviceSearch and avoid the custom async scan controllers.

However, if you have to use the async scan controllers for some reason, until it is fixed you can do the check manually before you request a new scanner:

if(AntPluginsPcc.getInstalledPluginsVersionNumber(yourContext) < 10800)
    
promptUserToUpdateAntPluginsService();
else
    
requestAsyncScanController(); 

     

Signature

Dynastream Developer

Rank

Total Posts: 6

Joined 2017-07-01

PM

I'll check mine. Because i just bought new phone it's lg Gg.
https://www.thisisant.com/forum/viewthread/6897/
I posted i thread. But no one is repsonding..      
Rank

Total Posts: 1

Joined 2018-12-16

PM

Hi,
are there any plans to release a new ANT+ Android SDK with support for the Tracker Device profile?      
Rank

Total Posts: 1

Joined 2019-01-25

PM

The same error with the async controller for Bike Speed and Cadence sensors


____________
192.168.0.1      
Rank

Total Posts: 3

Joined 2021-10-27

PM

I'm a newbie here. I'm so much glad to know more about it. Thank you so much!      
Rank

Total Posts: 4

Joined 2023-12-14

PM

If your Android device doesn't have built-in support for ANT+, you'll need the following—an ANT+ dongle, a USB extension cable that's compatible with your phone, and these three applications: ANT USB Service.
Slope Game