hey, using sensormanager in android application. understand have dispose in way once application closed, because otherwise continue listen changes. tried following:
@override public void ondestroy() { manager.unregisterlistener(temp); }
(when temp instance of templistener extends sensoreventlistener, , added sensormanager manager manager.registerlistener(temp...)). tried manager = null, cause me application force close. going wrong? thank you.
the problem didn't write super.ondestroy(). silly me...
Comments
Post a Comment