Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Connection with devices - request faild

Rank

Total Posts: 5

Joined 2018-07-30

PM

Hello dear forum,

Since last week I'm trying to understand and use the ANT+ API. I created a project with your Sampler in IntelliJ IDEA, and currently I'm debugging it via my smartphone which allows the ANT+ Plugin Service, etc.
In your Sampler when I want to start "Multi Device Search" I receive the message "RequestAccess faild. See logcat for details" (in any time).
But If at first I'm launching the any another programm which support the ANT+ Plugin Service and then launching my project and want to start the "Multi Device Search" functions it will be work: the phone finds the HRM, Cadence Sensor etc.

Here is running log of the just only my App launched:
I/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=1 eventTime 27922814 downTime 27922814 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.MainActivity
I
/ActivityThreadEuischedulePauseActivity com.papashkin.antsbiketrainer.MainActivity finished=false userLeaving=true configChanges=0 dontReport=false
I
/ActivityThreadEuiHandling launch of ActivityRecord{3e81889 token=android.os.BinderProxy@442608e {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher}} startsNotResumed=false
I
/ActivityThreadEuischeduleStopActivity com.papashkin.antsbiketrainer.MainActivity show=false configChanges=0
I
/ActivityThreadFinishing stop of ActivityRecord{ac81cc4 token=android.os.BinderProxy@d45cae2 {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.MainActivity}}show=false win=com.android.internal.policy.PhoneWindow@2b6128f
I
/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=2 eventTime 27923697 downTime 27923697 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher
I
/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=2 eventTime 27924021 downTime 27924021 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher
I
/ActivityThreadEuischedulePauseActivity com.papashkin.antsbiketrainer.DeviceSearcher finished=false userLeaving=true configChanges=0 dontReport=false
I
/ActivityThreadEuiHandling launch of ActivityRecord{7eb5636 token=android.os.BinderProxy@73c5937 {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceShower}} startsNotResumed=false
W
/AntPluginPccBBD30500RequestAccess failedOTHER_FAILURE
I
/ActivityThreadEuischedulePauseActivity com.papashkin.antsbiketrainer.DeviceShower finished=true userLeaving=false configChanges=0 dontReport=false
I
/ActivityThreadEuischeduleResumeActivity com.papashkin.antsbiketrainer.DeviceSearcher 


And here is the code when at first I launched another ANT+ supported App:

I/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=1 eventTime 28206448 downTime 28206448 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.MainActivity
I
/ActivityThreadEuischedulePauseActivity com.papashkin.antsbiketrainer.MainActivity finished=false userLeaving=true configChanges=0 dontReport=false
I
/ActivityThreadEuiHandling launch of ActivityRecord{3e81889 token=android.os.BinderProxy@442608e {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher}} startsNotResumed=false
I
/ActivityThreadEuischeduleStopActivity com.papashkin.antsbiketrainer.MainActivity show=false configChanges=0
I
/ActivityThreadFinishing stop of ActivityRecord{ac81cc4 token=android.os.BinderProxy@d45cae2 {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.MainActivity}}show=false win=com.android.internal.policy.PhoneWindow@2b6128f
I
/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=2 eventTime 28207631 downTime 28207631 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher
I
/ViewRootImplfinishMotionEventhandled true stage=10View Post IME stage,inputElapseTime=2 eventTime 28211182 downTime 28211182 titlecom.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher
I
/ActivityThreadEuischedulePauseActivity com.papashkin.antsbiketrainer.DeviceSearcher finished=false userLeaving=true configChanges=0 dontReport=false
I
/ActivityThreadEuiHandling launch of ActivityRecord{7eb5636 token=android.os.BinderProxy@73c5937 {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceShower}} startsNotResumed=false
I
/ActivityThreadEuischeduleStopActivity com.papashkin.antsbiketrainer.DeviceSearcher show=false configChanges=0
I
/ActivityThreadFinishing stop of ActivityRecord{3e81889 token=android.os.BinderProxy@442608e {com.papashkin.antsbiketrainer/com.papashkin.antsbiketrainer.DeviceSearcher}}show=false win=com.android.internal.policy.PhoneWindow@ab948d4 


Both the logs are similar and I don't know what is wrong?
I suppose the Plugin service is not running when I launch my App, but in documentation I didn't find anything about "how to use and launch services".
Another version that I use the antplusLib P.B4 (found on your site), but in GitHub another version: P.B5. Is it possible that the last version of the library brings the problem?
But may be you have another issue solving. I need a help with understanding of "Multi Device Search" mechanism, or how I can fix this problem.

Best regards,
Pavel      
Rank

Total Posts: 5

Joined 2018-07-30

PM

It seems I understood why I cant receive access to the MultiDeviceSearch method.
I used wife's phone and all work fine. During the tests I noted that the wife's phone has Android OS 5.1 Lollipop. In the same time my phone has Android OS 6.0.1 Marshmallow.
I tried to find any informations related difference between theese systems and got it.
For Androids OS less than 6.0 all permissions are accessed automatically. But start from Marshmallow all permissions are separated to two groups - normal (which work as earlier) and dangerous (they are off in all the time).
Currently I'm trying to check what the permissions need for ANT+. I suppose this is BODY_SENSORS (and, of course, it permission is dangerous) but don't sure in this. May be anybody helps me in this issue.

PS I found that the last version of ANT Radio Service is not 4.14.0 as you can find in Google Play. I found the more newer version - 4.14.30 and in this case the permission is granted strictly. And all works fine.