Skip to content

Most visited

Recently visited

navigation
RuntimePermissions /

AndroidManifest.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
  Copyright 2015 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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18
    package="com.example.android.system.runtimepermissions" >
19
 
21
 
22
    <!-- Note that all required permissions are declared here in the Android manifest.
23
     On Android M and above, use of these permissions is only requested at run time. -->
24
    <uses-permission android:name="android.permission.CAMERA"/>
25
 
26
    <!-- The following permissions are only requested if the device is on M or above.
27
     On older platforms these permissions are not requested and will not be available. -->
28
    <uses-permission-sdk-m android:name="android.permission.READ_CONTACTS" />
29
    <uses-permission-sdk-m android:name="android.permission.WRITE_CONTACTS" />
30
 
32
 
33
    <application
34
        android:allowBackup="true"
35
        android:icon="@mipmap/ic_launcher"
36
        android:label="@string/app_name"
37
        android:theme="@style/Theme.AppCompat.Light" >
38
        <activity
39
            android:name=".MainActivity"
40
            android:label="@string/app_name" >
41
            <intent-filter>
42
                <action android:name="android.intent.action.MAIN" />
43
 
44
                <category android:name="android.intent.category.LAUNCHER" />
45
            </intent-filter>
46
        </activity>
47
 
48
    </application>
49
 
50
</manifest>
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.