Coder Social home page Coder Social logo

ant-wireless / ant-android-sdks Goto Github PK

View Code? Open in Web Editor NEW
110.0 48.0 53.0 44.46 MB

ANT and ANT+ Android SDKs. Provides required libraries, services, sample code, and instructions for developing ANT and ANT+ enabled Android applications.

Java 100.00%

ant-android-sdks's Introduction

ANT and ANT+ Android SDKs

The Android ANT and Android ANT+ SDKs enable developers to create unique applications that use ANT wireless communication technology to communicate between a wide array of devices over various network configurations. ANT is a proven ultra-low power wireless sensor network protocol operating in the 2.4 GHz ISM band and is an effective solution for personal and local area networks. ANT is available on many Android devices including most modern flagship phones from Samsung and Sony. Additionally, ANT can be used on other devices with USB-Host(USB OTG) support through the use of an ANT USB stick.

This SDK contains the required resources for developing ANT enabled applications on Android platforms:

  • ANT+ SDK (often referred to as the 'ANT+ Plugins') enables Android developers to easily connect to ANT+ certified devices through a high level, intuitive API. The ANT+ SDK abstracts the connection and pairing process and the decoding and sending of data into easy to use functions and events.

  • ANT SDK (often referred to as the 'AntLib' or the 'ANT channels interface') enables developers to communicate directly with the ANT protocol to create and connect to custom ANT networks with flexible and powerful communication capabilities.

This SDK is available from:

Current Versions

  • Android ANT SDK v.C.B7 - 05 Jun 2023
  • Android ANT+ SDK v.P.B7 - 05 Jun 2023

Changelog

See the README.md file in each respective SDK directory for a detailed changelog.

FAQ

What is ANT?

Visit http://www.thisisant.com/developer for more information

What is the difference between ANT and ANT+?

Visit http://www.thisisant.com/developer/ant-plus/ant-antplus-defined/

Where can I get more info about ANT on Android (e.g. hardware requirements, developer instructions, licensing information)?

Visit http://www.thisisant.com/developer/ant/ant-in-android/ for more info

How do I use the ANT and ANT+ APIs?

Refer to the "Quick Start Guide" in the readme files of the ANT and ANT+ SDK main folders.

Where can I get help developing my ANT applications?

Visit the ANT developer forums at http://www.thisisant.com/forum/ or become an ANT+ Member for direct support.

ant-android-sdks's People

Contributors

ant-shane avatar harrychin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-android-sdks's Issues

Advances measures Weight Scale (Tanita BC-1000)

Hi,
making call with the requestAdvancedMeasurement(AntPlusWeightScalePcc.IAdvancedMeasurementFinishedReceiver advancedMeasurementFinishedReceiver, AntPlusWeightScalePcc.UserProfile userProfile) method the only measure I've received is weight mesasure, the rest of data (advanced measures) are -1 (invalid)

advanced-measures

method requestCapabilities(AntPlusWeightScalePcc.ICapabilitiesRequestFinishedReceiver capabilitiesReceiver) returns the following information

capabilities

**I do not get the advanced values because a profile is not assigned in the weight scale? Anyway when the method is called I'm passing a profile to it

What am I missing?**

Thanks!!

ANT+ Bicycle Power - Cycling Dynamics

Since last summer the bicycle power profile is extended with cycling dynamics. Could you please also update the Android SDK with support for cycling dynamics.

Thanks in advance!

Device scan - RequestAccess faild (Other Failure)

Hello dear developer.

I'm trying to develop own application using ANT+ sensors.
My app is based on your code from Samplers.
However I found the strange thing during tests. I mean that when I start to searching I receive a message:

W/AntPluginPcc: BBD30600: RequestAccess failed: OTHER_FAILURE

and nothing happens.
At first I suppose that a reason of this problem is that I have a phone with Marshmallow OS (instead my wife's phone is based on Lollipop OS and all works fine). I tried to find anything in documentation related this but didn't find anything interesting. I add to Manifest some permissions (I mean com.dsi.ant.permission.ANT, android.permission.BLUETOOTH etc.) but it doesn't help to me to solve my issue.
May be anybody received this problem and may be somebody solve it. Could you please share your solution to me?
Dear developer, could you please help me in this issue?

PS I install the ANT+ Plugin services, ANT Radio Service. in App I use the ANT+ SDK from github. May be I should use also the ANT SDK? (BTW I want to connect to HRM and cycle devices which use ANT+ protocol)

Source code of ANT+ Plugins Service

Thank you very much for the ANT+ Plugins Sampler, it is very helpful! It would be great if you could also publish the source code of ANT+ Plugins Service.
I would like to modify some DialogBoxes from ANT+ Plugins Service (language support, using different themes etc.)
screenshot_2015-11-18-17-13-05
screenshot_2015-11-18-17-12-54

I would like to provide a pull request afterwards :)

Blood pressure monitor - no method for downloading the latest measurement

I am trying to get measurement data during or right after the measurement of blood pressure. However, I do not want any old data also be received by my app. (Simply because it is hard to know whom these values belong to if there are multiple people using the same blood pressure monitor).

I realized there is only one way to get data from the blood pressure monitor, that is:

AntPlusBloodPressurePcc.requestDownloadMeasurements(downloadNewOnly,
    monitorForNewMeasurements,
    downloadMeasurementStatusReceiver,
    measurementDownloadedReceiver,
    antFsProgressUpdateRecevier)

I tried setting downloadNewOnly to true, however the device is still transmitting more than one last data (if the previous ones were not transmitted before). Is there a way to receive only the single current measurement, like in Weight Scale devices? I also noticed that the latest measurement is received latest by the client. Is this always the case?

Connection drop after startup

Installed LOS20 on SM-X200. Installed all necessary apps: AntRadioService, AntUSBService, AntPlugins. Insert USB dongle ANT+. The signal from the heart rate belt starts to arrive, but drops after 10 seconds

Could anyone help to solve the problem pls?

MODE_WORLD_READABLE no longer supported

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dsi.ant.antplus.pluginsampler/com.dsi.ant.antplus.pluginsampler.heartrate.Activity_AsyncScanHeartRateSampler}: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3304)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3443)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2040)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:221)
at android.app.ActivityThread.main(ActivityThread.java:7520)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
at android.app.ContextImpl.checkMode(ContextImpl.java:2636)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:463)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:453)
at com.dsi.ant.plugins.utility.log.LogAnt.getDebugLevel(LogAnt.java:62)
at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.bindAndRequest(AntPluginPcc.java:579)
at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAccess_Helper_SubMain(AntPluginPcc.java:558)
at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAsyncScan_Helper_SubMain(AntPluginPcc.java:533)
at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAccess_Helper_AsyncScanController(AntPluginPcc.java:437)
at com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc.requestAsyncScanController(AntPlusHeartRatePcc.java:521)
at com.dsi.ant.antplus.pluginsampler.heartrate.Activity_AsyncScanHeartRateSampler.requestAccessToPcc(Activity_AsyncScanHeartRateSampler.java:144)
at com.dsi.ant.antplus.pluginsampler.heartrate.Activity_HeartRateDisplayBase.handleReset(Activity_HeartRateDisplayBase.java:98)
at com.dsi.ant.antplus.pluginsampler.heartrate.Activity_AsyncScanHeartRateSampler.handleReset(Activity_AsyncScanHeartRateSampler.java:218)
at com.dsi.ant.antplus.pluginsampler.heartrate.Activity_HeartRateDisplayBase.onCreate(Activity_HeartRateDisplayBase.java:84)
at com.dsi.ant.antplus.pluginsampler.heartrate.Activity_AsyncScanHeartRateSampler.onCreate(Activity_AsyncScanHeartRateSampler.java:51)
at android.app.Activity.performCreate(Activity.java:7893)
at android.app.Activity.performCreate(Activity.java:7880)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3279)

is it possible to connect more than 8 devices with ant+ sdk?

I am developing an Android app, which expected to read from up to 24 heart rate sensors synchronously with ant+ protocal, at least 1 sample/second from each sensor.

If I understood it correctly, only 8 channels available with single usb stick. So I'm wondering, if it is possible to extend channels by plug in second/third usb ant+ stick? Or is there other way to connect to so many sensors?

Any information would be greatly appreciated.

Crash on Android 10

Using the pluginLib_3-6-0.jar on Android 10 results in the following crash :

java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
  at android.app.ContextImpl.checkMode (ContextImpl.java:2788)
  at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:471)
  at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:461)
  at com.dsi.ant.plugins.utility.log.LogAnt.getDebugLevel (LogAnt.java:62)
  at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.bindAndRequest (AntPluginPcc.java:599)
  at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAccess_Helper_SubMain (AntPluginPcc.java:568)
  at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAccess_Helper_Main (AntPluginPcc.java:512)
  at com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.requestAccess_Helper_AsyncSearchByDevNumber (AntPluginPcc.java:428)

on a Samsung Galaxy S10. Please fix as otherwise Ant+ cannot be used on Android 10.

Thank you

Robert

Problem on trainer commands

Using antpluginlib_3-8-0, we encounter a problem on AntPlusFitnessEquipmentPcc. When a command is sent to the trainer with "getTrainerMethods().requestSetTrackResistance", the library freezes and never returns the measurements. If a new command is sent to the trainer, the following log is detected: "AntPlusCommonPcc: BBD30800: Cmd requestSetTrackResistance failed to start because a local command is still processing."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.