Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

how to start android Programming with ANT

Avatar
Rank

Total Posts: 5

Joined 0

PM

How can I start communicating and programming my Android based terminal to connect its ANT module ?

I use special SDK library for android and I can't find how to control the ANT module. can any body advice me?      
RankRankRank

Total Posts: 95

Joined 2010-05-03

PM

Hi,

There is an ANT Android API available in the ANT website:
http://www.thisisant.com/pages/developer-zone/android-api

This API can be used to implement ANT communication on an Android based phone; provided the phone has the proper hardware for enabling ANT.

Could you provide more description of what exactly you want to do? Are you planning to work on existing Android-based phones? or do you want to add ANT support to your custom Android device?      
Avatar
Rank

Total Posts: 5

Joined 0

PM

thank you for your answer.
actually yes, I am developing a new Android application that would be based on ANT module inside the terminal.

I started building my project on Zigbee, but now I am going to develop it on ANT.

any open source examples would really help me to learn the ANT API faster. so I'll appreciate if you have any example for me.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The Android API is intended to implement ANT communication on an Android based phone that has the properly enabled hardware.

If you are integrating an ANT module into a custom design, you will need to write your own drivers to communicate with the module - UART or SPI. You can find more details on the interfacing requirements in the "Interfacing with ANT General Purpose Chipsets and Modules" document
http://www.thisisant.com/pages/developer-zone/ant-protocol-and-usage      
Avatar
Rank

Total Posts: 5

Joined 0

PM

Aha , I see.
I am working on Xperia10 mini device which already has this module,
but I still can't access to the interfacehandler on the API.

is that what you meant,,, to build the interface handler by myself ?

thank you and waiting      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

That is one of the phones with the proper hardware available.

Please have a look at the documentation and sample code in the API package.
http://www.thisisant.com/pages/developer-zone/android-api      
Avatar
Rank

Total Posts: 5

Joined 0

PM

ok I downloaded the API example,
and I still can't fix the interface class!!!
It can't reach IAnt_6.stub at all, and that's stopped my project.
on row 220

can you help me in finding it ?      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The API contains two projects - make sure your classpath in the ANTPlusDemo is set correctly so you can link to the interface class properly.      
Avatar
Rank

Total Posts: 5

Joined 0

PM

So far I connected the Demo project to the library.
but I still can't find subclass stub.


what is stub?and how to link it?
and how to connect it.
could any one give me an advice about how to run the example project on Java ?


thank you      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The error you are seeing still means that there is some problem linking the two projects together. Unfortunately, Eclipse does not easily allow exporting multiple projects with proper linking without having to adjust the paths when importing.

You might want to download the latest version of the Android API from our website - all code is included in a single project to avoid these linking issues.      
Avatar
Rank

Total Posts: 5

Joined 0

PM

well..
I am so sorry, I am confused now. :(
which API do you mean,
I downloaded the API from

http://www.thisisant.com/pages/developer-zone/android-api

is there something else ?      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Yes, that is the one.
A new version was released at the end of last week that should make the linking easier. Please give it a try.