IT. Expert System.

Android Reference

ContentObserver


android.database

Class ContentObserver

    • Constructor Detail

      • ContentObserver

        public ContentObserver(Handler handler)
        Creates a content observer.
        Parameters:
        handler - The handler to run onChange(boolean) on, or null if none.
    • Method Detail

      • getContentObserver

        public IContentObserver getContentObserver()
        Gets access to the binder transport object. Not for public consumption.
      • releaseContentObserver

        public IContentObserver releaseContentObserver()
        Gets access to the binder transport object, and unlinks the transport object from the ContentObserver. Not for public consumption.
      • deliverSelfNotifications

        public boolean deliverSelfNotifications()
        Returns true if this observer is interested receiving self-change notifications. Subclasses should override this method to indicate whether the observer is interested in receiving notifications for changes that it made to the content itself.
        Returns:
        True if self-change notifications should be delivered to the observer.
      • onChange

        public void onChange(boolean selfChange)
        This method is called when a content change occurs.

        Subclasses should override this method to handle content changes.

        Parameters:
        selfChange - True if this is a self-change notification.
      • onChange

        public void onChange(boolean selfChange,
                    Uri uri)
        This method is called when a content change occurs. Includes the changed content Uri when available.

        Subclasses should override this method to handle content changes. To ensure correct operation on older versions of the framework that did not provide a Uri argument, applications should also implement the onChange(boolean) overload of this method whenever they implement the onChange(boolean, Uri) overload.

        Example implementation:

        
         // Implement the onChange(boolean) method to delegate the change notification to
         // the onChange(boolean, Uri) method to ensure correct operation on older versions
         // of the framework that did not have the onChange(boolean, Uri) method.
         @Override
         public void onChange(boolean selfChange) {
             onChange(selfChange, null);
         }
        
         // Implement the onChange(boolean, Uri) method to take advantage of the new Uri argument.
         @Override
         public void onChange(boolean selfChange, Uri uri) {
             // Handle change.
         }
         

        Parameters:
        selfChange - True if this is a self-change notification.
        uri - The Uri of the changed content, or null if unknown.
      • dispatchChange

        @Deprecated
        public final void dispatchChange(boolean selfChange)
        Deprecated. Use dispatchChange(boolean, Uri) instead.
        Dispatches a change notification to the observer.

        If a Handler was supplied to the ContentObserver constructor, then a call to the onChange(boolean) method is posted to the handler's message queue. Otherwise, the onChange(boolean) method is invoked immediately on this thread.

        Parameters:
        selfChange - True if this is a self-change notification.
      • dispatchChange

        public final void dispatchChange(boolean selfChange,
                          Uri uri)
        Dispatches a change notification to the observer. Includes the changed content Uri when available.

        If a Handler was supplied to the ContentObserver constructor, then a call to the onChange(boolean) method is posted to the handler's message queue. Otherwise, the onChange(boolean) method is invoked immediately on this thread.

        Parameters:
        selfChange - True if this is a self-change notification.
        uri - The Uri of the changed content, or null if unknown.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 622 / . Delta: 0.03136 с