Assistant sharing

Users on Android phones can ask the Google Assistant to share app content with
another user using a voice command like "Hey Google, send this to Jane". Based
on the first user's system options, the Assistant may then incorporate text from
the screen or a device screenshot in the shared content.

Figure 1. Assistant shares a photo with a contact

This method of sharing is often sufficient, but users who receive content shared
from your app might not re-enter the app to view content. You can provide the
Assistant with structured information about the current foreground content by
implementing the onProvideAssistContent() method.

This process helps maintain the structure of data as it's shared to another
user. Users who receive shared app content can then be deep linked or receive
content directly, instead of as text or as a screenshot.

We recommend you implement onProvideAssistContent() for any sharable
entity in your app.

Providing content to the Assistant

You only need to implement onProvideAssistContent() for the final app activity
in the user's task flow after invoking the App Action. For example, in a
CREATE_MONEY_TRANSFER flow, you would implement the method in the final screen
showing the receipt; you wouldn't need to implement it for any in-progress or
preview screens.