in my appWidget I register some ContentObservers’ in the OnEnabled() method.
so I’ve been told that I should unregister my ContentObserver’s in the OnDisabled() method of my widget.
as far as I know, the only way to do so is by context.getContentResolver().unregisterContentObserver(observer);
the problem is: How do I save a pointer to the ContentObserver that I’ve registered in the OnEnabled() method, in order to delete it?
You need to have your widget start a Service and have the service register the ContentObservers. The Service can then push updates to the widget in response to notifications received by the ContentObservers.