Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Cell off Ant on?

RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

OK I want to lengthen the runtime I can get, which means I want to be able to switch the cell radio off but still have the Ant on. I don't think this is possible but it is desirable and if I was using Wifi or bluetooth it would be possible. I could go to Airplane mode then re-enable Bluetooth and WiFi leaving the cell off. How do I switch the Ant system back on?

I have managed to get switch the cell off and leave the Ant on on a 2.1 system using information here. http://stackoverflow.com/questions/7105750/enable-flight-mode-with-out-disabling-the-wifi-and-bluetooth-in-android
but this will not work for 2.3

What realy makes this anoying is that I have a test phone with no sim and it's cell radio standby power is even worse than when it has a sim in it. This realy is anoying as it looks to take out somthing like 30% of the potential runtime when data-logging.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

Currently ANT is disabled when Airplane mode is enabled, but we have been planning to make this configurable. I will make sure this is included in the next update of the ANT Radio Service so you can make use of it.      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

Good to here it's being worked on.

Thanks      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

You can try installing the latest ANT Radio Service (version 2.6) and removing "ant" from the AIRPLANE_MODE_RADIOS list. More documentation will be added to the Android API download soon.      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

The Market stuff says 2.6 but when I install it it says 2.5 and it is not not switching off with no 'ant' in the radios list.

Usfull testing still as I look to of broken my enter airplane mode when running case which I had working a month back..      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

OK I have got good updates now, not sure what went wrong.

It looks to work as expected. For now I have decided to use it like this.

There is a preference to keep Ant enabled when entering airplane mode. If this is selected then I check for 'ant' in the radios list and remove it at the point where I start my service and initalise ant. When my service is shutdown I add 'ant' back into the list if it's not there. I am leaving it for the user to set airplane mode using the standard methods once they have the ant system working. I tried putting the phone into airplane mode myself but it's more tricky to get right and messing it up would be bad. I prefer leaving it to the user as a seperate step, there is no way they can say they did not know what it meant if they do it.

Proper long test for it latter today.      
Rank

Total Posts: 6

Joined 0

PM

I am not sure how I can get to these preferences

Ant radio service 2.6 is installed in my xperia neo

When I start Ant+ Demo it works with my heart belt, but when I activate the flight mode the app loses the connection

Where is this Airplane mode radios list?
Do I have to program my app to delete ant from this list?      
Rank

Total Posts: 6

Joined 0

PM

ok I figured it out

just use this <uses-permission android:name="android.permission.WRITE_SETTINGS" > in manifest file

and this

Context context=getBaseContext();
Settings.System.putString(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_RADIOS, "cell, bluetooth, wifi");


where you want it      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

You should only be adding and removing the "ant" entry, and leaving the existing entries as they were. Forcibly setting the entire string is not recommended as the other devices may have already been removed from the list, or there may be a radio you do not know about (ie you break NFC).