<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->
<manifest xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android">


    <application>

        <!-- Register file provider to create shareable URIs -->
        <provider
            android:name=".sender.AssetFileProvider"
            android:authorities="com.example.platform.ui.share.sender.provider"
            android:exported="false"
            android:grantUriPermissions="true" />

        <!-- This BroadcastReceiver handles results of the sharesheet. -->
        <receiver
            android:name=".sender.ShareResultReceiver"
            android:exported="false"
            tools:targetApi="lollipop_mr1" />

        <activity
            android:name=".receiver.ShareReceiverActivity"
            android:exported="true"
            android:label="@string/receive_share">

            <!--
                Handle ACTION_SEND intents to receive data shared by other apps.
            -->
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.SEND_MULTIPLE" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:mimeType="text/*" />
                <data android:mimeType="image/*" />
            </intent-filter>

            <!--
                The app should handle Intent that's dispatched when one of our dynamic shortcuts is
                clicked. This is typically done with ACTION_VIEW intents with content URI for the
                clicked item.
            -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="platform.example.com"
                    android:pathPattern="/receiver/*"
                    android:scheme="https" />
            </intent-filter>

            <!--
                This XML describes what our dynamic shortcuts support.
            -->
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/sharing_shortcuts" />

        </activity>

    </application>

</manifest>
