Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT+ on Android 11

Rank

Total Posts: 7

Joined 2017-02-02

PM

hi all,
I am using antpluginlib_3-8-0.aar, which resolved some other issues we had in the past. However, the library does not work anymore with Android 11. Every single user is experiencing the same problem, namely the app reports that the ant plugin etc is not present (even though all the usual apps are installed and everything worked fine with Android 10).

Is there any update or any insight here on what I could do to resolve?

Thank you for your help      
Rank

Total Posts: 1

Joined 2019-05-04

PM

I posted a problem on Dec 19 2019 about the WORLD_READ problem on android 10.
I was sent a library that had it removed. Remember WORLD_READ in shared preferences was depricated in 2005. That library was posted here but never put into production. Yesterday I got the latest ANT+ lib hoping that there was a fix for Android 11 and i find that the android sdk is still from 2015. I am unclear why android is disregarded but I think that is the way it is. I am now re-writing my app to only support bluetooth but really want to have Ant+ and want this group to help more but I am unable to wait 6 years for a change to be made. So, your probably going to wait forever to see a fix.      
Rank

Total Posts: 3

Joined 2016-08-02

PM

I agree, developer support for ANT/ANT+ is very poor. Very few phones actually support ANT and the only thing that seems to get regular updates is the Fit SDK. I do wonder if it is dying, even garmin uses BLE in their products now.

there is a branch of the ANT Android SDKs repository that has changes to the ANT+ SDK in 2019

maybe this will help you      
Rank

Total Posts: 7

Joined 2017-02-02

PM

thank you, indeed I had previously used this, but now it is not working

Anyone at ANT here that cares to comment / help? Thanks      
Avatar
RankRankRankRank

Total Posts: 740

Joined 2012-09-14

PM

Do your users use ANT+ with built-in support or using the ANT USB Service?

I have seen some anecdotal reports that the mobile phone vendor may not have included the ANT HAL Service with their Android 11 patches.

A developer maintains an app you can use to test for this:
https://play.google.com/store/apps/details?id=com.quantrity.anttester      
Rank

Total Posts: 13

Joined 0

PM

Hi,

I'm working on upgrading my app to be able to target Android 11 instead of 10 (I have to adjust some things according to the storage permissions). While testing I have the same issue.

When I use the following:

compileSdkVersion 29
targetSdkVersion 29

Everything works fine with the antpluginlib_3-8-0 library.

When I change to

compileSdkVersion 30
targetSdkVersion 30

I get the RequestAccessResult DEPENDENCY_NOT_INSTALLED instead of SUCCESS when I requestAccess with the iPluginAccessResultReceiver.

Any clue how to solve?

It is quite important as Google policies require to target Android 11 November 2021 latest:
Starting August 2021, new apps will be required to target API level 30 (Android 11) and use the Android App Bundle publishing format. Starting November 2021, all app updates will be required to target API level 30 (Android 11). Apps with a download size of more than 150 MB are now supported by Play Asset Delivery and Play Feature Delivery.
     
Rank

Total Posts: 1

Joined 2013-02-11

PM

To fix the Android 11 plugin not found error, add the following code to you apps manifest...
<queries>
    <
package android:name="com.dsi.ant.plugins.antplus"/>
</
queries


Android 11 requires that packages need to be explicitly defined to be returned by the ant+ library's use of PackageManager.getInstalledPackages().      
Rank

Total Posts: 13

Joined 0

PM

Great thanks for your reply. This indeed fixes the issue!      
Rank

Total Posts: 2

Joined 2021-07-11

PM

djsteinke - 17 June 2021 08:08 AM
To fix the Android 11 plugin not found error, add the following code to you apps manifest...
<queries>
    <
package android:name="com.dsi.ant.plugins.antplus"/>
</
queries


Android 11 requires that packages need to be explicitly defined to be returned by the ant+ library's use of PackageManager.getInstalledPackages().


Help me please totally out of my depth. Trying to use samsung tab s6 lite which has built-in Ant+ with bkool software. The bkool will not even search for ant+ as if the tab is not compatible. I've even tried using a gongle      
Avatar
Rank

Total Posts: 2

Joined 2021-07-12

PM

ron.jawanda - 13 February 2021 04:31 PM
I posted a problem on Dec 19 2019 about the WORLD_READ problem on android 10.
I was sent a library that had it removed. Remember WORLD_READ in shared preferences was depricated in 2005. That library was posted here but never put into production. Yesterday I got the latest ANT+ lib hoping that there was a fix for Android 11 and i find that the android sdk is still from 2015. I am unclear why android is disregarded but I think that is the way it is. I am now re-writing my app to only support bluetooth but really want to have Ant+ and want this group to help more but I am unable to wait 6 years for a change to be made. So, your probably going to wait forever to see a fix.


I am also unclear why android is disregarded but I think that is the way it is. It seems to me that I won't have to wait 6 years, the changes will happen earlier, since Google has strict requirements for developers in terms of APIs used. But I agree that changes at the system level will have to wait for a long time. Or rebuild the apk file yourself so that it can support the Android 11 API      

Signature

Try newest service for helping with papers essayup

Rank

Total Posts: 2

Joined 2021-07-11

PM

I have since checked with another app. The samsung tab s6 works fine. It's at the Bkool end.