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>

Android permission的更多相关文章

  1. Android Permission 访问权限大全(转)

    程序执行需要读取到安全敏感项必需在androidmanifest.xml中声明相关权限请求, 完整列表如下: android.permission.ACCESS_CHECKIN_PROPERTIES允 ...

  2. 解决某些Android Permission denied

    最近遇到一个问题,总是在模拟器重报Permission denied错误,于是我直接在手机上测试,发现没有错误,于是很郁闷,反复在AndroidManifest中加入权限   <uses-per ...

  3. Android异常:唤醒锁未授权。(Caused by: java.lang.SecurityException: Neither user 10044 nor current process has android.permission.WAKE_LOCK.)

    Android异常:Caused by: java.lang.SecurityException: Neither user 10044 nor current process has android ...

  4. No permission to write APN settings: Neither user *** nor current process has android.permission.WRITE_APN_SETTINGS.

    在ICS40以前的版本中,如果程序需要设置APN,只需要在AndroidManifest文件中声明这个权限即可.在40的机器上运行则会抛出以下异常:java.lang.SecurityExceptio ...

  5. Android Permission中英对照

    android.permission.ACCESS_CHECKIN_PROPERTIESAllows read/write access to the "properties" t ...

  6. ServiceManager: Permmission failure: android.permission.RECORD_AUDIO

    今天在Android6.0系统的手机上测试一款APP,出现如题错误: ServiceManager: Permmission failure: android.permission.RECORD_AU ...

  7. android: permission和uses-permission

    首先,先看一下permission定义的格式: <permission android:description="string resource" android:icon= ...

  8. Android permission 访问权限大全

    程序执行需要读取到安全敏感项必需在androidmanifest.xml中声明相关权限请求, 完整列表如下: android.permission.ACCESS_CHECKIN_PROPERTIES ...

  9. Android安全机制(2) Android Permission权限控制机制

    http://blog.csdn.net/vshuang/article/details/44001661 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 1.概述 Andro ...

随机推荐

  1. Openvas 使用

    最新版的kali没有安装,配好源,就可以安装. 一. 简介: Nessus是其中一个最流行的和有强力的漏洞扫描器,尤其是对UNIX系统.它最初是自由和开放源码,但他们在2005年关闭了源代码,在200 ...

  2. SocketTcpClient

    public class SocketTcpClient { public static string ErrorMsg = string.Empty; private static Socket _ ...

  3. 转:RabbitMQ基础知识

    RabbitMQ基础知识 一.背景 RabbitMQ是一个由erlang开发的AMQP(Advanced Message Queue )的开源实现.AMQP 的出现其实也是应了广大人民群众的需求,虽然 ...

  4. Java加密算法 RSA

    Java加密算法 RSA 2015-06-06 08:44 511人阅读 评论(0) 收藏 举报  分类: JAVA(57)  公钥加密也称为非对称加密.速度慢.加密和解密的钥匙不相同,某一个人持有私 ...

  5. 如何修改SVN已提交项目的message log

    直接在TortoiseSVN中修改过往日志,会提示: DAV request failed;it's possible that the repository's pre-revprop-change ...

  6. 【学+原】CSS3的2D动画 ——仿NOMOS手表

    看CSS3妙味课堂中有一课是介绍如何做钟表界面,然后三根针都能随着时间转动,然后自己在那个简易的版本上做了一些进一部改进. 最关键的知识点应该是transform-origin这个样式,要选对旋转的中 ...

  7. PowerDesigner里数据表里AUTO_INCREMENT(自增)的设置

    使用流程: File->New Model->Model types->Physical Data Model->Physical Diagram 在下边DBMS里选择:MyS ...

  8. jspSmartUpload上传下载全攻略

    http://blog.itpub.net/92037/viewspace-788900/

  9. git patch

    http://www.cnblogs.com/y041039/articles/2411600.html

  10. postman+newman(2)

    用newman执行带环境变量的postman测试用例 1.在postman中将用例项目文件导出外还需将环境变量文件导出,如下: 2.newman执行如下: newman -c 测试用例文件 -e 环境 ...