Example usage for android.provider ContactsContract AUTHORITY_URI

List of usage examples for android.provider ContactsContract AUTHORITY_URI

Introduction

In this page you can find the example usage for android.provider ContactsContract AUTHORITY_URI.

Prototype

Uri AUTHORITY_URI

To view the source code for android.provider ContactsContract AUTHORITY_URI.

Click Source Link

Document

A content:// style uri to the authority for the contacts provider

Usage

From source file:com.android.contacts.DynamicShortcuts.java

@VisibleForTesting
void scheduleUpdateJob() {
    final JobInfo job = new JobInfo.Builder(ContactsJobService.DYNAMIC_SHORTCUTS_JOB_ID,
            new ComponentName(mContext, ContactsJobService.class))
                    // We just observe all changes to contacts. It would be better to be more granular
                    // but CP2 only notifies using this URI anyway so there isn't any point in adding
                    // that complexity.
                    .addTriggerContentUri(new JobInfo.TriggerContentUri(ContactsContract.AUTHORITY_URI,
                            JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS))
                    .setTriggerContentUpdateDelay(mContentChangeMinUpdateDelay)
                    .setTriggerContentMaxDelay(mContentChangeMaxUpdateDelay).build();
    mJobScheduler.schedule(job);/*from w w w. j  a  v a  2 s. c  om*/
}