Remove Attach Listener

Supporting 4.1 and up
brunoramos96
Phidgetsian
Posts: 10
Joined: Wed Sep 26, 2018 2:14 pm
Contact:

Remove Attach Listener

Postby brunoramos96 » Sun May 05, 2019 4:49 pm

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!

User avatar
mparadis
Site Admin
Posts: 690
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Remove Attach Listener

Postby mparadis » Mon May 06, 2019 8:09 am

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.

brunoramos96
Phidgetsian
Posts: 10
Joined: Wed Sep 26, 2018 2:14 pm
Contact:

Re: Remove Attach Listener

Postby brunoramos96 » Mon May 06, 2019 12:06 pm

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:


Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest