SensorEventListener doesn't get unregistered with unregisterListener() method

后端 未结 7 1565
一生所求
一生所求 2020-12-15 16:37

I have very simple Android app: in activity I have a button and I start/stop the OrientationListener. However, after unregistering it, in ddms I can still see the thread

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-15 17:04

    Could be a problem with scope. Try logging the values of sensorEventListener and sensor when you register and unregister them. (.toString()) to make sure that they are the same.

提交回复
热议问题