Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

[Android] Ant seems to crash phone

Rank

Total Posts: 7

Joined 2016-03-24

PM

I am playing around with the support for a Moxy-Sensor using Ant-Restricted-Library and a power meter using the standard Ant+ Android library.
However after a minute or so the phone reboots.

Has anyone else experienced similar issues?

In the log i can only see the following message:
AntPluginDevice(1150): BBC30600: Remote Exception sending client message: 10002
(appears several times)
     
Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

Hi Martin,

Firstly: I am guessing this is due to an exception in your code, but I am not completely surprised you can crash the phone.

Secondly: While I haven't seen this crash (as it's likely from an exception in your code...), I have seen issues where the services can be locked up when making API calls from within its own callbacks, because the calls out of the APIs are performed directly from the service's binder threads.

What does this mean? I would recommend wrapping every event/call from the ANT+ APIs in an immediate post to a worker thread (or Handler/queue), and let the API call return instantly.

Then for your case, you can look for your worker threads crashing, or wrap the logic in try/catch blocks, and see where you are causing an exception.

-Rohan      

Signature

blackramlabs.com

Rank

Total Posts: 7

Joined 2016-03-24

PM

vondes - 15 February 2017 03:57 AM
i have this problem with another app - call recorder, however after a minute or so the phone reboots. Can u help me?

i think you are asking your question in the wrong forum but i might be mistaken      
Rank

Total Posts: 6

Joined 2017-07-01

PM

arrgh - 06 January 2017 06:08 PM
Hi Martin,

Firstly: I am guessing this is due to an exception in your code, but I am not completely surprised you can crash the phone.

Secondly: While I haven't seen this crash (as it's likely from an exception in your code...), I have seen issues where the services can be locked up when making API calls from within its own callbacks, because the calls out of the APIs are performed directly from the service's binder threads.

What does this mean? I would recommend wrapping every event/call from the ANT+ APIs in an immediate post to a worker thread (or Handler/queue), and let the API call return instantly.

Then for your case, you can look for your worker threads crashing, or wrap the logic in try/catch blocks, and see where you are causing an exception.

-Rohan



I agree!!!