`
啸笑天
  • 浏览: 3436269 次
  • 性别: Icon_minigender_1
  • 来自: China
社区版块
存档分类
最新评论

Android权限注解

阅读更多

Android应用程序在使用很多功能的时候必须在Mainifest.xml中声明所需的权限,否则无法运行。下面是一个Mainifest.xml文件的例子:

 

<?xml version="1.0" encoding="utf-8"?>
 
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 
      package="hi.braincol.local.filebrowser"
 
      android:versionCode="1"
 
      android:versionName="1.0.0">
 
    <application android:icon="@drawable/icon" android:label="@string/app_name">
 
        <activity android:name=".FileBrowser"
 
                  android:label="@string/app_name">
 
            <intent-filter>
 
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
 
            </intent-filter>
 
        </activity>
 
    </application>
 
   <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER"/>
 
   <uses-permission android:name="android.permission.VIBRATE"/>
 
</manifest>

上面xml文件中的
就是允许应用程序使用SurfaceFlinger的底层属性。

Android中为应用程序准备了很多可选权限,下面是Android应用程序权限清单:

android.permission.ACCESS_CHECKIN_PROPERTIES :
Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded.
允许以read/write访问检入数据库(checkin database?)的”properties”表,并且可以更改、更新数据库。

android.permission.ACCESS_COARSE_LOCATION :
Allows an application to access coarse(e.g, Cell-ID, WiFi) location.
允许一个应用程序通过访问CellIDWiFi热点等方式获取粗略的本地位置。

android.permission.ACCESS_FINE_LOCATION :
Allows an application to access fine(e.g, GPS) location.
允许一个应用程序通过访问GPS等方式获取较精确的本地位置。

android.permission.ACCESS_LOCATION_EXTRA_COMMANDS :
Allows an application to access extra location provider commands.
允许一个应用程序访问(使用)额外的本地位置服务提供者。

android.permission.ACCESS_MOCK_LOCATION :
Allows an application to access mock location providers for testing.
允许一个应用程序访问(创建)模拟的位置服务提供者用于测试。

android.permission.ACCESS_NETWORK_STATE :
Allows applications to access information about networks.
允许应用程序访问(获取)网络信息。

android.permission.ACCESS_SURFACE_FLINGER :
Allows an application to use SurfaceFlinger’s low level features.
允许一个应用程序使用SurfaceFlinger的底层属性。(什么是SurfaceFlinger?

android.permission.ACCESS_WIFI_STATE :
Allows applications to access information about Wi-Fi networks.
允许应用程序获取Wi-Fi网络的信息)。

android.permission.ACCOUNT_MANAGER :
Allows an applications to call into AccountAuthenticators.
允许一个应用程序启动账户认证。

android.permission.AUTHERTICATE_ACCOUTS :
Allows an applicatons to act as an AccoutAuterticator for the AccoutManger.
允许一个应用程序充当账户认证管理者。

android.permission.BATTERY_STATS :

Allows an application to collect battery statistics.

允许一个应用程序获取电池使用的统计信息(剩余电量、电池的耗电情况(各主要应用程序耗电占总耗电的百分比等)等)

android.permission.BIND_APPWIGET :

Allows an application to tell the AppWiget service which application can access AppWiget data.

允许一个应用程序告知AppWiget服务:我(当前应用程序)可以访问AppWiget数据。

android.permission.BIND_DEVICE_ADMIN :

Must be required by device administration receiver, to ensure that only the system can interact with it.

设备管理服务必须拥有的权限,确保只有系统可以通过设备管理服务与设备进行互动(访问设备,数据交互)。

android.permission.BIND_INPUT_METHOD :

Must be required by an InputMethodService, to ensure that only the system can bind to it.

输入法服务(InputMethodService)必须拥有的权限,确保只有系统可以绑定之。

android.permission.BIND_WALLPAPER :
Must be required by a WallpaperService, to ensure that only the system can bind to it.

桌面服务(WallpaperService)必须拥有的权限,确保只有系统才可以绑定之.

android.permission.BLUETOOTH :

Allows applications to connect to paired buletooth devices.

允许应用程序连接到已配对的蓝牙设备(远端蓝牙,非本机蓝牙)。

android.permission.BULETOOTH_ADMIN :
Allows applications to discover an pair bluetooth devices.

允许应用程序搜索并且配对蓝牙设备。

android.permission.BRICK :

Required to be able to disable the device (very dangrous!).

禁用设备必须拥有的权限(危险,慎用!)。

android.permission.BROADCAST_PACKAGE_REMOVED :

Allows an application to boradcast a notification that an application package has been removed.

允许一个应用程序广播一个(不是同一个)应用程序包已经被移除的通告。(指一个应用程序已被卸装的通告?)

android.permission.BROADCAST_SMS :
Allows an application to broadcast an SMS receipt notification.

允许一个应用程序广播一个短信回执(如:帅哥,你有一条新的短消息!)的通告。

android.permission.BROADCAST_STICKY :

Allows an application to broadcast sticky intents.

允许一个应用程序广播常用(sticky?) intents.

android.permission.WAP_PUSH :

Allows an application to broadcast a WAP PUSH receipt notification.

允许一个应用程序广播WAP PUSH回执通告。

说明:WAP-PUSHWAP推送短信,是一种特殊格式的短信。WAP-PUSH可以将某一站点或某一业务的链接通过短息发送到支持WAP的设备,WAP PUSH实现了短信和WAP业务的结合。

android.permission.CALL_PHONE :
Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call being placed.

允许应用程序不经过用户拨号界面而直接拨号。

android.permission.CALL_PRIVILEGED :

Allows an application to call any phone number, including emergency numbers, without going througth the Dialer user interface for confirm the call being palced.

允许应用程序不经过用户拨号界面而拨打任意号码(包括紧急号码)。(紧急号码是指哪些?)

android.permission.CAMERA :

Required to be able to access the camera device.

访问摄像头设备必须具备的权限。

android.permission.CHANGE_COMPONENT_ENABLED_STATE :
Allows an application to change whether an application component (other than its own) is enabled or not.

允许一个应用程序改变另一个应用程序组件的启用状态(禁用或启用)。

android.permission.CHANGE_NETWORK_STATE :

Allows applications to change network connecitity state.

允许应用程序更改网络连接状态。

android.permission.CHANGE_WIFIMULTICAST_STATE :

Allows applications to enter Wi-Fi Multicast mode.

允许应用程序进入Wi-Fi Multicast 模式。

说明:Multicast,多重广播,网络中的一个节点发出的信息被多个节点接收。

android.permission.CHANGE_WIFI_STATE :

Allows applications to change Wi-Fi connectivity state.

允许应用程序更改Wi-Fi连接状态。

android.permission.CLEAR_APP_CACHE :

Allows an application to clear the caches of all installed application on the device.

允许一个应用程序清理所有已安装程序的设备缓冲区 (是安装的时候使用的缓冲区,还是运行时候的缓冲区?)

android.permission.CLEAR_APP_USER_DATA :
Allows an application to clear user data.

允许一个应用程序清理用户数据。

android.perimmision.CONTROL_LOCATION_UPDATES :

Allows enabling/disabling location update notification from the radio.

允许启用/禁用位置更新的提示信息。(from the radio? 通过电波获得的位置更新信息?)

android.permission.DELETE_CACHE_FILES :

Allows an application to delete cache files.

允许一个应用程序删除cache文件。

android.permission.DLEETE.PACKAGES :

Allows an application to delete packages.

允许一个应用程序删除packagesapk安装包?还是所有类型的压缩包?)

android.permission.DEVICE_POWER :

Allows low-level access to power management.

允许访问底层的电源管理。

android.permission.DIAGNOSTIC :

Allows application to RW to diagnostic resources.

允许应用程序读写诊断资源(diagnostic resources)。(什么事diagnostic resources?诊断信息,log?)

android.permission.DISABLE_KEYGUARD :

Allows aplications to disable the keyguard.

允许应程序禁用键盘锁。

android.permission.DUMP :

Allows an application to retrieve state dump information from system services.

允许一个应用程序从系统服务中抓取(检索)状态转储信息。(什么是state dump?将数据从一个设备转存到另外一个设备?)

android.permission.EXPAND_STATUS_BAR :

Allows an applicaton to expand or collapse the status bar.

允许一个应用程序扩张或收缩状态栏。

android.permission.FACTORY_TEST :

Run as an manufacturer test application, running as the root user.

允许像厂家测试程序那样以root用户权限运行应用程序。

android.permission.FLSHLIGHT :

Allows access to the flashlight.

允许访问闪光信号灯。

android.permission.FORCE_BACK :

Allows an application to force a BACK operation on whatever is the top activity.

允许一个应用程序在activity上强制执行一个回退操作,无论这个activity是否是顶层的activity

android.permission.GET_ACCOUNTS :

Allows access to the list of accouts in the Accounts Service.

允许访问账号服务的账号列表。

android.permission.GET_PACKAGE_SIZE :

Allows an application to find out the space used by any package.

允许应用程序获得任何package占用的存储空间。

android.permission.GET_TASKS :

Allows an appllication to get information about the currently or recently running tasks: a thumbnail representation of the tasks ,what activities are running in it, etc.

允许一个应用程序获得的当前或最近运行的任务信息:像在任务中运行了哪些activitys等一些简短信息。

android.permission.GLBOAL_SEARCH :

This permission can be used on content providers to allow the global search system to access their data.

拥有该权限的content providers将允许全局搜索系统访问其数据。

android.permission.HARDWARE_TEST :

Allows access to hardware peripherals.

允许访问外设。

android.permission.INJECT_EVENTS :

Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window.

允许一个应用程序向事件流(事件队列)注入用户事件(keystouchtarckball),并且将其传递给窗口。

android.permission.INSTALL_LOCATION_PROVIDER :

Allows an application to install a locaton provider int the location Manager.

允许应用程序程序安装一个位置服务到位置管理器。

androd.permission.INSTALL_PCAKAGES :

Allows an application to install packages.

允许一个应用程序安装packages。(用于版本升级的?)

android.permission.INTERNAL_SYSTEM_WINDOW :

Allows an application to open windows that are for use by parts of the system user interface.

允许一个应用程序打开系统用户界面中的窗口。

android.permission.INTERNET :

Allows application to open networkd sockets.

允许应用程序打开网络套接字(sockets)。

android.permission.KILL_BACKGROUND_PROCESSES :

Allows an application to call killBackgroundProcesses(String).

允许应用程序调用killBackgroundProcesses(String)方法。

android.permission.MANAGE_ACCOUNTS :

Allows an application to manage the list of accouts in the AccountManager.

允许应用程序管理AccountManager中的账户列表。

android.permission.MANAGE_APP_TOKENS :

Allows an application to manage (create, destroy, Z-order) application tokens in the window manager.

允许一个应用程序管理(创建、销毁、Z-order)在窗口管理器中的应用程序图标。

android.permission.MASTER_CLEAR:

none.

没任何描述。

android.permisson.MODIFY_AUDIO_SETTINGS :

Allows an application to modify global audio settings.

允许一个应用程序更改全局音频设置。

android.permission.MODIFY_PHONE_STATE :

Allows modification of the telephony state – power on, mmi, etc.

允许修改电话(手机?)状态——上电,人机界面(mmi,Man Machine Interface)等。

android.permission.MOUNT_FORMAT_FILESYSTEMS :

Allows formatting file sysytems for removable storage.

允许格式化移动存储设备。

android.permission.MOUNT_UNMOUNT_FILESYSYTEMS :
Allows mounting and unmounting the file sysytems for removable storage.

允许加载或卸载移动存储设备。

android.permission.FERSISTENT_ACTIVITY :
Allows an application to make its activities persistent.

允许一个应程序设置其activities具有持久性(persistent activities是什么样的activites?)。

android.permission.PROCESS_OUTGOING_CALLS :

Allows an application to monitor, modify, or abort outgoing calls.

允许应用程序监视、修改、忽略拨出的电话(拨号)

android.permission.READ_CALENDAR :

Allows an application to read the user’s calendar data.

允许一个应用程序读取用户日历数据。

android.permission.READ_CONTACTS :

Allows an apllication to read the user’s contacts data.

允许一个应用程序读取用户联系人列表。

android.permission.READ_FRAME_BUFFER :

Allows an application to take screen shots and more generally get access to the frame buffer data.

允许一个应用程序通过访问帧缓冲区(一般一屏就是一帧)获取屏幕截图等帧数据。

android.permission.READ_HISTORY_BOOKMARKS :

Allows an application to read (but not write) the user’s browsing history and bookmarks.

允许一个应用程序读取浏览器的历史记录和书签。

android.permission.READ_INPUT_STATE :

Allows an application to retrieve the current state of keys and switches.

允许一个应用程序获取当前keysswitches的状态(keysswitchs都是输入设备)。

android.permission.READ_LOGS :

Allows an application to read the low-level system log files.

允许一个应用程序读取底层系统的log文件。

android.permission.READ_OWNER_DATA :

Allows an application to read the owner’s data.

允许一个应用程序读取所有者的数据。(手机的owner?)

android.permission.READ_PHONE_STATE :

Allows read only access to phone state.

允许读取(不可写)手机状态。

android.permission.READ_SMS :

Allows an application to read SMS messages.

允许一个应用程序读取手机短消息。

android.permission.READ_SYNC_SETTING :

Allows applications to read the sync setting.

允许应用程序读取同步设置

android.permission.READ_SYNC_STATS :

Allows applications to read sync stats.

允许一个应用程序读取同步状态。

android.permission.REBOOT :

Required to be able to reboot the device.

重启设备必须具有的权限。

android.permission.RECEIVE_BOOT_COMPLETED :

Allows an application to receive the ACTION_BOOT_COMPLETED that is boradcast after the sysytem finishes booting.

允许应用程序获取系统完全启动之后的ACTION_BOOT_COMPLETED广播。

android.permission.RECEIVE_MMS :

Allows an application to monitor incoming MMS messages, to record or perform processing on them.

允许一个应用程序监控收到的彩信(MMS),记录或处理之。

android.permission.RECEIVE_SMS :

Allows an application to monitor incoming SMS messages, to record or perform processing on them.

允许一个应用程序监控收到的短信(SMS),记录或处理之。

android.permission.RECEIVE_WAP_PUSH :

Allows an application to monitor incoming WAP push messages.

允许一个应用程序监测接受的WAP-PSUH消息。

android.permission.RECORD_AUDIO :
Allows an application to record audio.

允许一个应用程序录音。

android.permission.REORERD_TASKS :

Allows an application to change the Z-order of tasks.

允许一个应用程序改变任务的Z-order(类似于优先级?)

android.permission.RESTART_PACKAGES :

This constant is deprecated. The restartPackage(String) API is no longer supported.

这个常量已不再使用,restartPackage这个API函数不再有效。

android.permission.SEND_SMS :
Allows an application to send SMS messages.

允许应用程序发送短消息(SMS)。

android.permission.SET_ACTIVITY_WATHCER :

Allows an application to watch and control how activities are started globally in system.

允许一个应用程序在全局系统中监控activities是如何被启动的。

android.permission.SET_ALWAYS_FINISH :

Allows an application to control whether activities are immediately finished when put in the background.

允许应用程序无论activies是否刚刚结束,都将应用程序置于后台运行。(强制结束activies,置应用程序于后台运行?)

android.permission.SET_ANIMATION_SCALE :

Modify the global animation scaling factor.

修改全局动画缩放比例。

android.permission.SET_DEBUG_APP :

Configure an application for debugging.

为调试配置一个应用程序。

android.permission.SET_ORIENTATION :

Allows low-level access to setting the orientation (actually rotation) of the screen.

允许设置屏幕方向(实际上就是旋转屏幕)。

android.permission.SET_PREFERRED_APPLICATIONS :

This constant is deprecated, No longer useful, see addPackageToPreferred(String)for details.

这个常量已经无效了。

android.permission.SET_PROCESS_LIMIT :

Allows application to set the maximum number of (not needed) application processes that can be runing.

允许应用程序设置最大可用进程数(不是必须的)。

android.permission.SET_TIME :

Allows applications to set the system time.

允许应用程序设置系统时间。

android.permission.SET_TIME_ZONE :

Allows applications to set the system time zone.

允许应用程序设置系统时区。

android.permission.SET_WALLPAPER :

Allows applications to set the wallpaper.

允许应用程序设置桌面。

android.permission.SET_WALLPAPER_HINTS :
Allows application to set wallpaper hints.

允许应用程序设置桌面提示。(wallpaper hints 是什么东东?) 

android.permission.SINGAL_PERSISTENT_PROCESSES :

Allows an application to request that a signal be sent to all persistent processes.

允许应用程序请求一个发送给所有持续进程的信号(signal)。(persistent processes 是什么样的进程?)

android.permission.STATUS_BAR :

Allows an application to open, close, or disable the status bar and its icons.

允许一个应用程序打开、关闭、禁用状态栏和状态栏图标。

android.permission.SUBSCRIBED_FEEDS_READ :

Allows an application to allow access the subscribed feeds ContentProvider.

允许一个应用程序访问订阅RSS feedsContentProvider

android.permission.SUBSRIBED_FEEDS_WRITE :

None.

没有任何描述。

android.permission.SYSYTEM_ALERT_WINDOW :
Allows an application to open windows using the type TYPE_SYSTEM_ALERT, show on top of all other applications.

允许应用程序打开一个TYPE_SYSTEM_ALERT类型的系统警告(提示)窗口, 并将其置于顶层显示。

android.permission.UPDATE_DEVICE_STATS :

Allows an application to update device statistics.

允许应用程序更新设备统计信息。

android.permission.USE_CREDENTIALS :

Allows an application to request authtokens from the AccountManager.

允许一个应用程序向AccountManager申请授权标记。

android.permission.VIBRATE :

Allows access to the vibrator.

允许访问振动器。

android.permission.WAKE_LOCK :

Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming.

允许使用PowerManager WakeLocks,避免处理器进入休眠,或屏幕变暗。

android.permission.WRITE_APN_SETTINGS :

Allows applications to write the apn settings.

允许应用程序设置APN

说明:APNAcess Point Name)即接入点名称,用来标识GPRS的业务种类,目前分为两大类: CMWAP(通过GPRS访问WAP业务)、CMNET(除了WAP以外的服务目前都是CMNET,比如连接因特网等)。

android.permission.WRITE_CALENDAR :

Allows an application to write (but not read) the user’s calendar data.

允许应用程序只写用户日历数据。

android.permission.WRITE_CONTACTS :

Allows an application to write (but not read) the user’s contacts data.

允许应用程序只写用户联系人数据。

android.permission.WRITE_EXTERNAL_STORAGE :

Allows an application to write to external storage.

允许应用程序写数据到外部存储设备(主要是SD)

android.permission.WRITE_GSERVICES :

Allows an application to modify the Google service map.

允许应用程序修改google地图服务。

android.permission.WRITE_HISTORY_BOOKMARKS :

Allows an application to write (but not read) the user’s browsing history and bookmarks.

允许一个应用程序写数据到用户浏览器历史记录和书签。

android.permission.WRITE_OWNER_DATA :

Allows an application to write (but not read) the owner’s data.

允许一个应用程序写入(填入)所有者(手机所有者?)的信息。

android.permission.WRITE_SECURE_SETTINGS :

Allows an application to read or write the secure system settings.

允许一个应用程序读写系统安全设置。

android.permission.WRITE_SETTINGS :

Allows an application to read or write the system setting.

允许一个应用程序读写系统设置。

android.permission.WRITE_SMS :

Allows an application to write SMS messages.

允许一个应用程书写短消息。

android.permisson.WRITE_SYNC_SETTING :

Allows applications to write the sync setting.

允许应用程序更改同步设置。

 

感谢:http://disanji.net/2011/03/18/android-app-permission/

分享到:
评论

相关推荐

    android所有权限注解

    android所有权限注解,比较详细,注释也比较详细,合适大家看!

    工具类-Android动态申请权限

    权限动态申请,可以动态处理,请求相关权限。注解模式

    Android6.0权限检测映射封装

    封装了6.0以后获取权限时的繁琐工作,只需要在需要执行的方法添加注解即可方便的获取权限。

    Android基于注解的6.0权限动态请求框架详解

    主要介绍了Android基于注解的6.0权限动态请求框架详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

    Android代码-国产手机权限适配框架

    意为 Permissions for M,基于 hongyangAndroid 的 MPermissions 项目二次开发,使用编译时注解,较运行时注解效率更高。另较原有项目有以下升级: 支持 java8 支持一行代码同步请求多个权限 支持多种回调函数,...

    Android权限处理

    PermissionsDispatcher使用了编译时解析注解的方式,通过apt自动生成.class方式帮我们去写申请权限的逻辑,很好很强大,并且适配了小米手机,但是它也不支持Service中去申请权限。考虑到我们项目中的应用场景并且...

    Android SDK Permission大全访问权限

    该资源里面涵盖了android开发中所有的权限设置及注释,非常全面!!

    Android 如何实现动态申请权限

    主要介绍了Android 如何实现动态申请权限。具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧

    Android应用源码获取root权限静默安装

    代码只有一个MainActivity,看起来相对比较容易,代码中重要部分都已加入详细的注释,方便大家阅读。不过应用程序运行命令获取ROOT权限,设备必须已破解(获得ROOT权限),代码中主要对流进行操作,有对文件读写不...

    fast-permission:一个注解解决android动态权限,支持各种扩展

    FastPermission为android权限请求框架,一个注解解决android权限请求,基于aspectj实现,使用注解即可请求权限,简单方便。 NeedPermission支持在所有的方法中使用和activity的类上使用,提供了权限前操作,权限后的...

    Android6.0运行时权限Demo

    Android 6.0有了新的权限规则,这个demo以最简洁的代码凸显了6.0的新的权限规则的特性,里面还有详细注释哦。

    Android代码-基于注解调用简单的AP来处理新的Android运行权限模型

    Annotation based simple API flavoured with AOP to handle new Android runtime permission model. If you check Google's Samples about the new permission model, you'll see a lot of boiler plate code for ...

    Android应用源码获取root权限静默安装.rar

    Android应用源码获取root权限静默安装是一个获取root权限后,不弹出系统安装界面,直接进行安装的的源码。代码只有一个MainActivity,看起来相对比较容易,代码中重要部分都已加入详细的注释,方便大家阅读。不过...

    Android uses-permission权限列表中文注释版

    如果你的应用希望去使用任何系统资源,我们必须去申请Android的权限。这就是元素的作用。一个权限通常有以下格式,用一个名字为name 的字符串去指导我们希望使用的权限。 代码如下:&lt;uses android:name=”string”/&gt;...

    Android使用注解进行代码检查的实现方法

    Android Studio 内置了代码检查工具 Lint,可在菜单栏选择 Analyze &gt; Inspect Code 执行相应的代码检查,代码... 权限注解 返回值注解 CallSuper注解 Typedef注解 可访问性注解 Nullness注解 使用 Nullness 注解

    Rk3399 获取系统ROOT权限补丁7.1与8.1.rar

    device/rockchip/common/device.mk 中根据注释,注释掉verity开启的代码 # setup dm-verity configs. # uncomment the two lines if use verity ) 5、在device/rockchip/rk3399/fstab.rk30board....

    Android Studio实现文件管理器,源代码详细注释

    开发环境依旧是在Android Studio4.2.1,只要你的AS是近两年从官网下载的,都是可以满足的。日期版本是比4.2.1高的。 当用户同意权限之后,先判断手机中是否装载了sd卡,如果有sd卡则获取SD卡的根目录,设置当前父...

    Android Studio实现功能丰富的仓库管理系统

    本次项目主要实现了仓库...Android Studio的版本只要在3.6.1及以上都行,配置5.6.4的gradle就可以。项目演示的效果图可以参考主页博客https://blog.csdn.net/qq_42257666/article/details/118398953,源码有详细注释。

    仅使用批注确保Android运行时权限-Android开发

    带注释的Android权限负责确保对Activity或Fragment中的带有SecurePermissions注释的方法的Android运行时权限。 Aaper目录什么是默认行为示例Aaper的用法更改默认行为自定义策略示例使用我们的自定义策略更改请求前...

Global site tag (gtag.js) - Google Analytics