About People Directory

Starting in Android 17 QPR2 (API level 37.2), the People Provider acts as a central aggregator for person and group identities across installed communication apps, such as Voice over IP (VoIP) and messaging apps on Android. It lets communication apps synchronize their contacts and reachability capabilities with the system. This enables authorized client apps, such as system dialers and contacts managers, to query unified records and route users directly into communication flows.

Use cases and benefits

The People Provider ecosystem defines a standardized API surface, PeopleContract, that decouples data authorities from client apps. It supports two primary developer roles:

  • Communication apps (People Directories): Apps that declare an exported ContentProvider tagged with android.content.PeopleDirectory. These apps fulfill sub-queries from the system, notify the People Provider of data changes, and expose an Activity that handles interaction intents.
  • Client apps (system dialers and contacts apps): Apps that query aggregated records from the People Provider's internal database, observe background database synchronization, and launch communication sessions.

System architecture and features

The People Provider maintains an internal database that synchronizes with registered People Directories across the device, presenting a unified, structured query interface to client apps.

To optimize performance and respect battery constraints, the People Provider uses the following architecture:

  • Internal database query serving: When a client app queries the People Provider (content://com.android.people/persons or content://com.android.people/groups), the provider immediately serves records stored in its internal database. This delivers low-latency responses for UI rendering.
  • Deferred synchronization: If requested records from a target People Directory aren't yet synchronized or need updating in the internal database, the People Provider doesn't block the calling thread or spawn unconstrained background processes. Instead, the provider schedules debounced background synchronization jobs with JobScheduler. Global directory synchronizations and batch operations are scheduled to run during optimal device states, such as when the device is idle and charging.
  • Reactive updates with ContentObserver: Because initial queries return records available in the internal database while background synchronization jobs run, client apps observe updates using ContentObserver. The People Provider returns a query-specific notification URI in the cursor extras under PeopleContract.EXTRA_NOTIFICATION_URI. When the background synchronization job completes and updates the internal database, the People Provider triggers this notification URI, signaling the client app to re-query for updated records.
  • Routing communication interactions: Client apps don't send arbitrary intents directly to individual People Directory packages. Instead, client apps call PeopleContract.createPeopleInteractionRequest to obtain a system-minted PendingIntent. When sent, this PendingIntent securely routes the user to the target People Directory app's interaction Activity.

Core APIs and classes

The PeopleContract class defines the constants, URIs, and builder utilities for the People Directory ecosystem, as summarized in the following table:

Class Purpose
PeopleContract.Directory Constants and methods to discover installed People Directories, notify data modifications (notifyChange), or request full database synchronizations (requestRefresh).
PeopleContract.Persons URIs, column definitions, and query builder utilities (Persons.Query.Builder) for person identity records.
PeopleContract.Groups URIs, column definitions, and query builder utilities (Groups.Query.Builder) for group identity records.
PeopleContract.Capability Bitmask flags (VOICE_REACHABILITY, VIDEO_REACHABILITY, and TEXT_REACHABILITY) specifying communication reachability.
PeopleContract.Intents Intent actions (ACTION_START_PEOPLE_INTERACTION), extra keys, and interaction type constants (PEOPLE_INTERACTION_TYPE_VOICE, PEOPLE_INTERACTION_TYPE_VIDEO, and PEOPLE_INTERACTION_TYPE_MESSAGE).

What's next

Additional resources