1<?xml version="1.0" encoding="UTF-8"?><!--
2 Copyright 2019 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16
17<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:tools="http://schemas.android.com/tools"
19    package="com.example.android.sharingshortcuts"
20    android:versionCode="1"
21    android:versionName="1.0">
22
23    <application
24        android:allowBackup="true"
25        android:icon="@mipmap/ic_launcher"
26        android:label="@string/app_name"
27        android:theme="@style/SharingShortcutsTheme"
28        tools:ignore="GoogleAppIndexingWarning">
29
30        <activity
31            android:name=".MainActivity"
32            android:label="@string/app_name">
33            <intent-filter>
34                <action android:name="android.intent.action.MAIN" />
35                <category android:name="android.intent.category.LAUNCHER" />
36            </intent-filter>
37            <!-- Reference resource file where the app's shortcuts are defined -->
38            <meta-data
39                android:name="android.app.shortcuts"
40                android:resource="@xml/shortcuts" />
41        </activity>
42
43        <activity
44            android:name=".SendMessageActivity"
45            android:label="@string/app_name"
46            android:theme="@style/SharingShortcutsDialogTheme">
47            <!-- This activity can respond to Intents of type SEND and with text/plain data -->
48            <intent-filter>
49                <action android:name="android.intent.action.SEND" />
50                <category android:name="android.intent.category.DEFAULT" />
51                <data android:mimeType="text/plain" />
52            </intent-filter>
53            <!-- Only needed if you import the sharetarget AndroidX library that provides
54                 backwards compatibility with the old DirectShare API.
55                 The activity that receives the Sharing Shortcut intent needs to be taken into
56                 account with this chooser target provider. -->
57            <meta-data
58                android:name="android.service.chooser.chooser_target_service"
59                android:value="androidx.sharetarget.ChooserTargetServiceCompat" />
60        </activity>
61
62        <activity
63            android:name=".SelectContactActivity"
64            android:label="@string/app_name"
65            android:theme="@style/SharingShortcutsDialogTheme" />
66
67        <!-- Only needed if you want to add a thumbnail to the direct share.
68            FileProvider is a subclass of ContentProvider that facilitates secure sharing.
69            Here we specify a FileProvider for our app. -->
70        <provider
71            android:name="androidx.core.content.FileProvider"
72            android:authorities="com.example.android.sharingshortcuts.fileprovider"
73            android:exported="false"
74            android:grantUriPermissions="true">
75            <!-- Specify the directories the FileProvider can generate content URIs for. -->
76            <meta-data
77                android:name="android.support.FILE_PROVIDER_PATHS"
78                android:resource="@xml/file_paths" />
79        </provider>
80
81    </application>
82
83</manifest>
84