This software development kit provides the resources needed to develop an Android application which uses ANT technology to communicate wirelessly between ANT enabled devices. It includes instructions, API and documentation, and reference sample applications. The PDF Creating ANT Android Applications explains how to get started.
If you are trying to develop an application to connect to ANT+ devices on the ANT+ network, you must use the ANT+ Android SDK instead.
This SDK is available from:
- http://www.thisisant.com/developer/resources/downloads/
- https://github.com/ant-wireless/ANT-Android-SDKs (subscribe as a watcher to be notified of updates)
Note: Refer to the "Creating ANT Android Applications" (.pdf) file for more detailed info
- Ensure ANT Radio Service (ARS) is installed on device
- Reference ANTLib library in your application project
- Refer to the Acquire Channels Sample to see how to:
- Bind to ARS
- Acquire channels
- Configure and open channels
- Send and receive data
- Release channels
Note: Each top-level folder has a readme file which contains descriptions of the applications and tools and their intended purpose
- Creating ANT Android Applications (.pdf)
- API
- ANT Lib 4.16.0 (.aar and Javadoc)
- Services
- ANT Radio Service 4.18.0 (.apk)
- ANT USB Service 1.6.1 (.apk)
- Sample Applications
- Acquire Channels Sample 1.3.0 (.apk and source)
- Background Scan Sample 1.2.0 (.apk and source)
- Tools
- ANT Service Settings App 2.0.0 (.apk)
- Emulator Bridge Tool 2.0.0 (.apk and PC app)
- ANT Support Checker 1.2.0 (.apk)
If you have any questions about developing ANT applications or need help visit the ANT developer forums at http://www.thisisant.com/forum/ or become an ANT+ Member for direct support.
- IMPORTANT BEHAVIOUR CHANGE: AntLib must be updated to v4.16.0 or higher to be compatible with API Level 30 and higher due to changes in the Android SDK for package visibility [AntLib]
- Updated to support Android 13 (API Level 33)
- Updated AntLib to v4.16.0
- Updated ANT Radio Service to v4.18.0
- Updated to support Android 13 (API Level 33)
- Updated ANT USB Service to v1.6.1
- Updated to support Android 13 (API Level 33)
- Updated Acquire Channels Sample to v1.3.0
- Converted to Android Studio project
- Updated to support Android 13 (API Level 33)
- Updated Background Scan Sample to v1.2.0
- Converted to Android Studio project
- IMPORTANT BEHAVIOUR CHANGE: Add Channel Not Available Exception if getAdapterInfo is called before service is not initialized instead of returning blank list [ARS + AntLib]
- IMPORTANT BEHAVIOUR CHANGE: Only perform error recovery channel release when channel closes with an ack in progress on adapters with firmware affected by this bug (see Javadoc for startSendAcknowledgedData) [ARS]
- Added logic to ignore built-in ANT adapters which never properly initialize making legacy apps never able to access USB adapters [ARS]
- Add support for fast channel initiation feature in extended assignment [ARS + AntLib]
- Add support for search uplink optimization feature [ARS + AntLib]
- Add finalizer to ANT channel to prevent apps from leaking channels [AntLib]
- Improve Javadoc explanations of search time outs [AntLib]
- Fix search priority capability being reported properly in capabilities [ARS + AntLib]
- Fix some exceptions during service intialization and shutdown [ARS]
- Always send ChannelsAvailable broadcast even if no apps are actively using channels [ARS]
- Fix support for 3rd party adapter providers relying on implicit bind [ARS]
- Add capability to use continuous scan mode on adapters that support it [ARS + ANTLib]
- Fix Android 5.0 intent compatibility (If you compile your app targeting API >=21 you must use ANTLib >=4.9.0 or you will see 'java.lang.IllegalArgumentException: Service Intent must be explicit') [ANTLib]
- Fix Android 5.0 permissions compatibility (i.e. Play Store error 505) [ARS]
- Add support for obtaining information about attached ANT adapters and their capabilities [ARS + ANTLib]
- Add support to obtain a channel from a specific ANT adapter [ARS + ANTLib]
- Add support for search priority control [ARS + ANTLib]
- Add support to use multiple private networks simultaneously on adapters that support more network slots [ARS]
- Add ANT_NOT_ENABLED channel not available reason for when phones start providing ANT as a system setting [ARS + ANTLib]
- Add proper equals() support to ChannelID class to easily compare Channel IDs) [ANTLib]
- Fix RSSI values incorrect on some Qualcomm based platforms [ARS]
- Fix a rare deadlock when releasing channels) [ANTLib]
- Fix an IllegalArgumentException when intitializing the ANT USB Service [ARS]
- Fix a possible deadlock when shutting down with an active burst [ARS]
- Fix a thread leak when shutting down when a channel is being cleaned up [ARS]
- Fix global ref table resource leak when releasing channels [ARS]
- Fix NEW_CHANNELS_AVAILABLE intent to be sent out everytime a new adapter is attached (i.e. when a USB stick is inserted) [ARS]
- Fix hang when calling burst on a closed channel [ARS]
- Fix NullPointerException occuring when USB Service is force stopped [ARS]
- Cleaned up some logging and javadoc [ARS + ANTLib]
- Add support for some new private network keys [ARS]
- Fix Android 5.0 permissions compatibility (i.e. Play Store error 505)
- Change service icon to grey to show up better on both dark and light backgrounds
- Fix an ANR caused by the removal of the USB stick is removed at the same time as acknowledging the USB device permission popup
- Fix NullPointerException processing ANT events when the ARS is shutting down
- Fix multiple USB device permission popups for the same device
- Cleaned and fixed up some logging
- Updated to AntLib 4.10.0
- Updated to AntLib 4.10.0
- Fix a possible IllegalStateException doing list updates
- Fix service to be visible on Play Store for phones without bluetooth again
- Fix null pointer crash in ChannelCloseController.onChannelMessage() when adapter changes state
- Fix burst function to return earlier when channel drops to search instead of waiting the full search timeout period
- Fix required and desired capabilities to work again when requesting channels (was broken since 4.4.0)
- Note: AntLib is unchanged since 4.6.0 but version number was updated to keep in sync with service
- Clarified some info in readmes
- Renames to remove spaces
- Added workaround for some Wilink 7 based phones (such as the Xperia Ray) not sending close event after search timeout
- Released to Play Store, removed 'RC' tag
- Updated:
- ANT Radio Service (details below)
- ANTLib (details below)
- ANT USB Service (details below)
- Added:
- ANT Service Settings App
- Emulator Bridge Tool
- ANT Support Checker
- Added readme's and changelog
- Now releasing through GitHub in addition to thisisant.com (https://github.com/ant-wireless/ANT-Android-SDKs)
- Added a new ChannelNotAvailableReason - ANT_DISABLED_AIRPLANE_MODE_ON to indicate that airplane mode must be disabled before ANT can be used
- Channels interface will now attempt to automatically enable disabled adapters
- Add support for using private network keys
- Added Bluetooth permissions to service package based on feedback from Google since some phones require interacting with bluetooth stack for ANT communication
- Change service icon to grey to show up better on both dark and light backgrounds
- ANT+ channel RF frequency of 2457 is now reserved only for use by channels on the ANT+ network key
- Removed requestSerialNumber() as it is unused by current multi-mode implementations
- Fix channel spontaneously closing when re-opening channels quickly
- Fix sending multiple channel death messages when channel dies
- Fix respect airplane mode on Android 4.2+ devices where manufacturer has not explicitly specified airplane behaviour
- Fix error recovery looping indefinitely
- Fix service is properly disabled when airplane mode is enabled suring service intializing
- Fix hang during service startup when airplane mode is enabled on some devices
- Fix certain devices shut down or refuse to enable ANT if bluetooth is on when airplane mode is enabled
- Fix premature erroneous burst result can be received before burst is finished when acknowledged messages are being processed on other channels
- Fix channel messages still being sent to callback after calling release
- Fix possible exception processing concurrent bursts on multiple channels
- Fix burst message error on some devices that causes only partial part of message to be sent but still reports success
- Fix channel not able to be acquired again if it is closed when an ack or burst transfer is in progress
- Fix hasExtendedData returning true in some cases where extended data does not exist
- Fix some adapters with non-standard power levels could change to non-default power levels when channels are assigned
- Fix extraneous debug logging whenever bursts occur
- Fix exception using legacy interface when interface is not claimed
- Fix some issues with old applications using legacy interface crashing or hanging
- Fix legacy enable/disable requests sent to shutdown adapter leave adter in error state permanently
- Fix legacy calls to enable and disable not being processed during service initializing state
- Fix exception that could occur with multiple USB sticks plugged in
- Fix exception when rapidly unplugging and plugging-in USB sticks
- Fix eventBuffering calls failing in legacy interface
- Fix USB access request repeatedly popping up
- Fix some issues handling multiple sticks plugged in simultaneously
- Fix some crashes
- Change service icon to grey to show up better on both dark and light backgrounds