phoenix13

导航

 

1. users-permission

Users-permission is the permission that this app should acquire, so that the app can run properly.

Standard permissions like: read contact, use location.

Or start another app which has a permission defined.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="course.labs.permissionslab" >

    <!-- standard permission-->
    <uses-permission
        android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
        android:maxSdkVersion="20" />
    <!-- customized permission-->
    <uses-permission android:name="course.labs.permissions.DANGEROUS_ACTIVITY_PERM" />

    <application>

    </application>

</manifest>

 

2. permission

Defined a customized permission.

 

<?xml version="1.0" encoding="utf-8"?>
<manifest>

    <permission
        android:name="course.labs.permissions.DANGEROUS_ACTIVITY_PERM"
        android:label="my_permission"
        android:protectionLevel="normal" >
    </permission>

    <application>

        <activity
            android:permission="course.labs.permissions.DANGEROUS_ACTIVITY_PERM"
            android:name=".DangerousActivity"
            android:label="@string/app_name" >

            <!--
                 TODO - add additional intent filter info so that this Activity
                  will respond to an Implicit Intent with the action
                  "course.labs.permissions.DANGEROUS_ACTIVITY"
            -->

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="course.labs.permissions.DANGEROUS_ACTIVITY" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>

</manifest>

 

posted on 2015-10-22 12:05  phoenix13  阅读(279)  评论(0编辑  收藏  举报