to top
StorageProvider /

AndroidManifest.xml

1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
 Copyright 2013 The Android Open Source Project
4
 
5
 Licensed under the Apache License, Version 2.0 (the "License");
6
 you may not use this file except in compliance with the License.
7
 You may obtain a copy of the License at
8
 
9
     http://www.apache.org/licenses/LICENSE-2.0
10
 
11
 Unless required by applicable law or agreed to in writing, software
12
 distributed under the License is distributed on an "AS IS" BASIS,
13
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 See the License for the specific language governing permissions and
15
 limitations under the License.
16
-->
17
 
18
 
19
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
20
          package="com.example.android.storageprovider"
21
          android:versionCode="1"
22
          android:versionName="1.0">
23
 
24
    <uses-sdk
25
        android:minSdkVersion="19"
26
        android:targetSdkVersion="19"/>
27
 
28
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
29
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
30
 
31
    <application
32
        android:allowBackup="true"
33
        android:label="@string/app_name"
34
        android:icon="@drawable/ic_launcher"
35
        android:theme="@style/MyAppTheme">
36
 
37
        <activity
38
            android:name=".MainActivity"
39
            android:uiOptions="splitActionBarWhenNarrow"
40
            android:label="@string/app_name">
41
            <intent-filter>
42
                <action android:name="android.intent.action.MAIN"/>
43
                <category android:name="android.intent.category.LAUNCHER"/>
44
            </intent-filter>
45
        </activity>
46
 
48
        <!--
49
        Declare the document provider class MyCloudProvider to the system.  The MANAGE_DOCUMENTS
50
        permission belongs only to the Android system, ensuring this provider will never be used
51
        directly by another app.  The provider must grant URI permissions in order to expose the
52
        specific documents(s) chosen, while not sharing all of its data by default.  It must be
53
        exported to be visible outside the application, and it must include a filter with the intent
54
        "android.content.action.DOCUMENTS_PROVIDER" in order to be shown in the system document
55
        picker UI.
56
        -->
57
        <provider
58
            android:name="com.example.android.storageprovider.MyCloudProvider"
59
            android:authorities="com.example.android.storageprovider.documents"
60
            android:grantUriPermissions="true"
61
            android:exported="true"
62
            android:permission="android.permission.MANAGE_DOCUMENTS">
63
            <intent-filter>
64
                <action android:name="android.content.action.DOCUMENTS_PROVIDER"/>
65
            </intent-filter>
66
        </provider>
68
 
69
    </application>
70
 
71
</manifest>