Page 1 of 1

Remove Attach Listener

Posted: Sun May 05, 2019 4:49 pm
by brunoramos96
Can anyone explain me the purpose of removeAttachListener in Phidgets22 library?
I'm with some problems. When I start my app, I do my configurations and then I arrive at the activity where I do the measurement of acceleration with the 1041 accelometre. But when I go back to do new configurations and return to the activity of measurement, I can no longer get data of the accelometre.
The activity, according to the lifecycle of an activity, is destroyed when I return to the activity before, so I was expecting that the part of the code that specifies the attachListener and detachListener would work normaly. Since it doesn't happen I'm wondering if the void removeAttachListener would help, but I don't know how to declare it or even what is its purpose.

Hope someone can help me!

Re: Remove Attach Listener

Posted: Mon May 06, 2019 8:09 am
by mparadis
Do you think you could post some of your code here? It's hard to understand what might be going wrong without seeing the code.

Re: Remove Attach Listener

Posted: Mon May 06, 2019 12:06 pm
by brunoramos96
mparadis wrote:Do you think you could post some of your code here? It's hard to understand what might be going wrong without seeing the code.
After some tries I fugured out a way. Thanks anyway :wink: