Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT App to Android Emulator Error

Rank

Total Posts: 11

Joined 2014-06-15

PM

Hi,

I am working with an existing ANT android application which I am trying to run on an emulator from eclipse.

Despite using the ANT Android Emulator Bridge with an ANTUSB2 stick, I continue to get the LogCat: "Package com.example.xxxxxx requires unavailable shared library com.dsi.ant.antradio_library; failing!" and the app fails to install to the emulator.

Does anyone have any experience with this procedure and/or error message who could possibly help out? I am fairly certain I have followed the instructions correctly, and there's every chance I'm missing something simple.

Thank you very much.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Hi mallen,

Is this an app you are developing/have access to the source, or are you trying to run an existing apk?

This is a check available in the original Android ANT API that apps can choose to use to enforce only running on a phone with ANT hardware. The initial emulator support included AVD images which added this library to report support. Since then ANT support has been expanded to include ANT USB Sticks, and apps should not enforce this. Dedicated ANT AVD images are no longer provided, allowing you to use any Android SDK version.

Cheers,
-Rohan
     
Rank

Total Posts: 11

Joined 2014-06-15

PM

Hi Rohan.

Thanks for the quick response.

I am developing/investigating existing source code. I found that commenting out the <uses-library android:name="com.dsi.ant.antradio_library" > line from the manifest allowed me to install the apk to the emulator.

Cheers.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Good work finding that yourself, and it is the recommended fix.
Your app should check for ANT support at runtime if required, rather than restricting its install to devices with native ANT.

Note that if you are communicating to ANT+ devices, then switching to the ANT+ API will drastically improve ease of development (and certification).
If this is not relevant for you, moving to the new ANT API (with Channel Provider) will allow your app to run concurrently with others, and also provides an easier to use OO definition of messages.      
Rank

Total Posts: 11

Joined 2014-06-15

PM

In fact, the application now throws ANT not supported (I guess at checkAntState() in the sample code class AntPlusManager). I have not yet had time to investigate this myself, but if you have any quick thoughts it would be much appreciated.

Thanks for your help.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

The simplest solution is to remove the check of hasAntSupport().

Which app are you trying to build? Is this your own custom app, or the ANT+ Demo previously provided with the ANT SDK?