android权限文档

合集下载

android读写文件权限流程

android读写文件权限流程

Android读写文件权限流程概述在A nd ro id开发中,应用程序需要获取特定的权限以便能够读取和写入设备上的文件。

本文将介绍An dr oi d中读写文件权限的流程,帮助开发者了解如何正确处理文件访问权限相关的问题。

为什么需要文件权限A n dr oi d系统为了保护用户的隐私和数据安全,对应用程序的文件访问进行了限制。

如果应用程序想要读取或写入设备上的文件,必须首先获取相应的权限。

否则,在没有权限的情况下进行文件操作将会引发安全异常。

文件读取权限步骤1:在A n d r o i dM a n i f e s t.x m l中声明权限要读取设备上的文件,首先需要在应用的清单文件(A nd ro id Ma ni fe st.xm l)中声明文件读取权限。

可以使用以下代码将读取权限添加到清单文件中:<u se s-p e rm is si on an dr oid:na me="an dr oi d.p e rm is si on.R EA D_E X TE RN AL_ S T OR AG E"/>这个权限允许应用程序读取外部存储(如S D卡)上的文件。

步骤2:检查权限在代码中进行文件读取操作前,需要先检查应用是否已经获得了文件读取权限。

可以使用以下代码来检查权限:i f(C on te xt Co mp at.c he ck Se lf Pe rm iss i on(c on te xt,M ani f es t.p e r mi ss io n.RE AD_EX T ER NA L_ST OR AG E)!=Pa ck ag eM an ag er.P ER MI SS I O N_G RA NT ED){//没有读取权限,请求权限}e ls e{//已经有读取权限,进行文件读取操作}步骤3:请求权限如果在步骤2中检查到没有读取权限,应该向用户请求获取该权限。

android读写文件权限流程

android读写文件权限流程

android读写文件权限流程
一、 Android读写文件权限介绍
Android SDK提供了文件 I/O 的功能,它使开发人员可以使用简单
的API操作本地文件系统。

在Android 6.0 及更高版本中,对文件I/O,
用户必须显式地获取权限才能继续进行操作。

Android针对本地文件读写,提供了相应的权限控制,主要有类似的
内容:
1、读取外部存储文件权限:
2、写入外部存储文件权限:
二、Android文件读写权限流程
Android读写文件权限的整个流程如下:
1、应用开发者在AndroidManifest文件中声明
“android.permission.READ_EXTERNAL_STORAGE”和
“android.permission.WRITE_EXTERNAL_STORAGE”权限;
2、当用户启动应用的时候,系统会检测应用是否声明了需要申请的
权限;
3、如果声明了需要申请的权限,系统就会向用户发出权限请求提示;
4、用户选择同意或拒绝;
5、如果用户同意,系统会授予该应用相应的权限;
6、如果用户拒绝,应用就无法使用该权限。

三、Android文件读写权限的注意事项
1、在Android 6.0及更高版本中,开发者需要在AndroidManifest 中声明需要申请的权限;
2、在申请权限的时候,要确保用户理解其申请的权限;
3、如果用户拒绝权限,应用就无法使用该权限;。

Android权限列表permission说明(一)

Android权限列表permission说明(一)

Android权限列表permission说明(一)网络上不乏android权限列表,但是很少有将列表和使用方法放在一起的,所以特此总结一下需要在AndroidManifest.xml中定义相应的权限(以获取internet访问权限为例),如下:Xml代码1.< uses-permission android:name =”android.permission.INTERNET”/>注意在<application>也可以定义INTERNET权限,如下:Xml代码1.< application android:permission =”android.permissio n.INTERNET” >android.permission.ACCESS_CHECKIN_PROPERTIES允许读写访问"properties"表在checkin数据库中,改值可以修改上传( Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded)android.permission.ACCESS_COARSE_LOCATION允许一个程序访问CellID或WiFi热点来获取粗略的位置(Allows an application to access coarse (e.g., Cell-ID, WiFi) location)android.permission.ACCESS_FINE_LOCATION允许一个程序访问精良位置(如GPS) (Allows an application to access fine (e.g., GPS)location)android.permission.ACCESS_LOCATION_EXTRA_COMMAND S允许应用程序访问额外的位置提供命令(Allows an application to access extra location provider commands)android.permission.ACCESS_MOCK_LOCATION允许程序创建模拟位置提供用于测试(Allows an application to create mock location providers for testing)android.permission.ACCESS_NETWORK_STATE允许程序访问有关GSM网络信息(Allows applications to access information about networks)android.permission.ACCESS_SURFACE_FLINGER允许程序使用SurfaceFlinger底层特性(Allows an application to use SurfaceFlinger's low level features)android.permission.ACCESS_WIFI_STATE允许程序访问Wi-Fi 网络状态信息(Allows applications to access information about Wi-Fi networks)android.permission.ADD_SYSTEM_SERVICE允许程序发布系统级服务(Allows an application to publish system-level services).android.permission.BATTERY_STATS允许程序更新手机电池统计信息(Allows an application to update the collected battery statistics)android.permission.BLUETOOTH允许程序连接到已配对的蓝牙设备(Allows applications to connect to paired bluetooth devices) android.permission.BLUETOOTH_ADMIN允许程序发现和配对蓝牙设备(Allows applications to discover and pair bluetooth devices)android.permission.BRICK请求能够禁用设备(非常危险)(Required to be able to disable the device (very dangerous!).) android.permission.BROADCAST_PACKAGE_REMOVED允许程序广播一个提示消息在一个应用程序包已经移除后(Allows anapplication to broadcast a notification that an application package has been removed)android.permission.BROADCAST_STICKY.允许一个程序广播常用intents(Allows an application to broadcast sticky intents) 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 through the Dialer user interface for the user to confirm the call being placed)android.permission.CAMERA请求访问使用照相设备(Required to be able to access the camera device. )android.permission.CHANGE_COMPONENT_ENABLED_STAT E允许一个程序是否改变一个组件或其他的启用或禁用(Allows an application to change whether an application component (other than its own) is enabled or not. )android.permission.CHANGE_CONFIGURATION允许一个程序修改当前设置,如本地化(Allows an application to modify the current configuration, such as locale. )android.permission.CHANGE_NETWORK_STATE允许程序改变网络连接状态(Allows applications to change network connectivity state)android.permission.CHANGE_WIFI_STATE允许程序改变Wi-Fi 连接状态(Allows applications to change Wi-Fi connectivity state) android.permission.CLEAR_APP_CACHE允许一个程序清楚缓存从所有安装的程序在设备中(Allows an application to clear the caches of all installed applications on the device. )android.permission.CLEAR_APP_USER_DATA允许一个程序清除用户设置(Allows an application to clear user data)android.permission.CONTROL_LOCATION_UPDATES允许启用禁止位置更新提示从无线模块(Allows enabling/disabling location update notifications from the radio. )android.permission.DELETE_CACHE_FILES允许程序删除缓存文件(Allows an application to delete cache files)android.permission.DELETE_PACKAGES允许一个程序删除包(Allows an application to delete packages)android.permission.DEVICE_POWER允许访问底层电源管理(Allows low-level access to power management)android.permission.DIAGNOSTIC允许程序RW诊断资源(Allows applications to RW to diagnostic resources. ) android.permission.DISABLE_KEYGUARD允许程序禁用键盘锁(Allows applications to disable the keyguard )android.permission.DUMP允许程序返回状态抓取信息从系统服务(Allows an application to retrieve state dump information from system services.)android.permission.EXPAND_STATUS_BAR允许一个程序扩展收缩在状态栏,Android开发网提示应该是一个类似Windows Mobile 中的托盘程序(Allows an application to expand or collapse the status bar. )android.permission.FACTORY_TEST作为一个工厂测试程序,运行在root用户(Run as a manufacturer test application, running as the root user. )android.permission.FLASHLIGHT访问闪光灯,Android开发网提示HTC Dream不包含闪光灯(Allows access to the flashlight ) android.permission.FORCE_BACK允许程序强行一个后退操作是否在顶层activities(Allows an application to force a BACK operation on whatever is the top activity. )android.permission.FOTA_UPDATE暂时不了解这是做什么使用的,Android开发网分析可能是一个预留权限.android.permission.GET_ACCOUNTS访问一个帐户列表在Accounts Service中(Allows access to the list of accounts in the Accounts Service)android.permission.GET_PACKAGE_SIZE允许一个程序获取任何package占用空间容量(Allows an application to find out the space used by any package. )android.permission.GET_TASKS允许一个程序获取信息有关当前或最近运行的任务,一个缩略的任务状态,是否活动等等(Allows an application to get information about the currently or recently running tasks: a thumbnail representation of the tasks, what activities are running in it, etc.)android.permission.HARDWARE_TEST允许访问硬件(Allows access to hardware peripherals. )android.permission.INJECT_EVENTS允许一个程序截获用户事件如按键、触摸、轨迹球等等到一个时间流,Android开发网提醒算是hook技术吧(Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window.)android.permission.INSTALL_PACKAGES允许一个程序安装packages(Allows an application to install 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 applications to open network sockets)android.permission.MANAGE_APP_TOKENS允许程序管理(创建、催后、z-order默认向z轴推移)程序引用在窗口管理器中(Allows an application to manage (create, destroy, Z-order) applicationtokens in the window manager. )android.permission.MASTER_CLEAR目前还没有明确的解释,Android开发网分析可能是清除一切数据,类似硬格机android.permission.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. )android.permission.MOUNT_UNMOUNT_FILESYSTEMS允许挂载和反挂载文件系统可移动存储(Allows mounting and unmounting file systems for removable storage. )android.permission.PERSISTENT_ACTIVITY允许一个程序设置他的activities显示(Allow an application to make its activities persistent. )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 application 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_INPUT_STATE允许程序返回当前按键状态(Allows an application to retrieve the current state of keys and switches. )android.permission.READ_LOGS允许程序读取底层系统日志文件(Allows an application to read the low-level system log files. )android.permission.READ_OWNER_DATA允许程序读取所有者数据(Allows an application to read the owner's data)android.permission.READ_SMS允许程序读取短信息(Allows an application to read SMS messages.)android.permission.READ_SYNC_SETTINGS允许程序读取同步设置(Allows applications to read the sync settings)android.permission.READ_SYNC_STATS允许程序读取同步状态(Allows applications to read the sync stats)android.permission.REBOOT请求能够重新启动设备(Required to be able to reboot the device. )android.permission.RECEIVE_BOOT_COMPLETED允许一个程序接收到ACTION_BOOT_COMPLETED广播在系统完成启动(Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. )android.permission.RECEIVE_MMS允许一个程序监控将收到MMS彩信,记录或处理(Allows an application to monitor incoming MMS messages, to record or perform processing on them. ) android.permission.RECEIVE_SMS允许程序监控一个将收到短信息,记录或处理(Allows an application to monitor incoming SMS messages, to record or perform processing on them.) android.permission.RECEIVE_WAP_PUSH允许程序监控将收到WAP PUSH信息(Allows an application to monitor incoming WAP push messages. )android.permission.RECORD_AUDIO允许程序录制音频(Allows an application to record audio)android.permission.REORDER_TASKS允许程序改变Z轴排列任务(Allows an application to change the Z-order of tasks) android.permission.RESTART_PACKAGES允许程序重新启动其他程序(Allows an application to restart other applications) android.permission.SEND_SMS允许程序发送SMS短信(Allowsan application to send SMS messages)android.permission.SET_ACTIVITY_WATCHER允许程序监控或控制activities已经启动全局系统中Allows an application to watch and control how activities are started globally in the system.android.permission.SET_ALWAYS_FINISH允许程序控制是否活动间接完成在处于后台时Allows an application to control whether activities are immediately finished when put in the background.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允许一个程序修改列表参数PackageManager.addPackageT oPreferred() 和PackageManager.removePackageFromPreferred()方法(Allows an application to modify the list of preferred applications with the PackageManager.addPackageT oPreferred() and PackageManager.removePackageFromPreferred() methods.) android.permission.SET_PROCESS_FOREGROUND允许程序当前运行程序强行到前台(Allows an application to force any currently running process to be in the foreground.)android.permission.SET_PROCESS_LIMIT允许设置最大的运行进程数量(Allows an application to set the maximum number of (not needed) application processes that can be running. ) 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允许程序设置壁纸hits(Allows applications to set the wallpaper hints) android.permission.SIGNAL_PERSISTENT_PROCESSES允许程序请求发送信号到所有显示的进程中(Allow an application to request that a signal be sent to all 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允许一个程序访问订阅RSS Feed内容提供(Allows an application to allow access the subscribed feeds ContentProvider. )android.permission.SUBSCRIBED_FEEDS_WRITE系统暂时保留改设置,Android开发网认为未来版本会加入该功能。

安卓开发手机权限大全

安卓开发手机权限大全

android.permission.ACCESS_NETWORK_STATE允许程序访问有关GSM网络信息(Allowsapplications to access information about networks)android.permission.ACCESS_WIFI_STATE允许程序访问Wi-Fi网络状态信息(Allowsapplications to access information about Wi-Fi networks)android.permission.BLUETOOTH允许程序连接到已配对的蓝牙设备(Allowsapplications to connect to paired bluetooth devices)android.permission.BLUETOOTH_ADMIN允许程序发现和配对蓝牙设备(Allowsapplicationsto discover and pair bluetooth devices)android.permission.CHANGE_WIFI_STATE允许程序改变Wi-Fi连接状态(Allowsapplications to change Wi-Fi connectivity state)android.permission.DEVICE_POWER允许访问底层电源管理(Allowslow-level access to power management)android.permission.DISABLE_KEYGUARD允许程序禁用键盘锁(Allowsapplications to disable the keyguard )android.permission.EXPAND_STATUS_BAR允许一个程序扩展收缩在状态栏,Android开发网提示应该是一个类似WindowsMobile中的托盘程序(Allows an application to expand or collapse the status bar.)android.permission.GET_DETAILED_TASKS 检索正在运行的应用的详细信息,恶意程序可借此获得其他应用的私密信息android.permission.GET_TASKS 检索正在运行的应用,可用于了解当前设备上使用了哪些应用android.permission.INJECT_EVENTS 将自身的输入事件(例如按键)提供给其他应用,恶意程序可坚持控制手机android.permission.INTERNAL_SYSTEM_WINDOW 允许创建未授权的内部系统窗口,普通应用绝不应该使用此权限android.permission.MANAGE_APP_TOKENS 创建和管理令牌,普通应用绝不应该使用此权限android.permission.MASTER_CLEAR 恢复出厂设置android.permission.MANAGE_NETWORK_POLICYandroid.permission.MANAGE_USBandroid.permission.MOUNT_UNMOUNT_FILESYSTEMS允许挂载和反挂载文件系统可移动存储(Allowsmounting and unmounting file systems for removable storage. )android.permission.RECEIVE_BOOT_COMPLETED允许一个程序接收到 ACTION_BOOT_COMPLETED广播在系统完成启动(Allowsan application to receive the ACTION_BOOT_COMPLETED that is broadcast after thesystem finishes booting. )android.permission.REORDER_TASKS允许程序改变Z轴排列任务(Allowsan application to change the Z-order of tasks)android.permission.READ_PHONE_STATE 读取手机的状态和身份,可以确定手机的号码/序列号/是否处于通话状态/被叫号码android.permission.READ_FRAME_BUFFER 读取帧缓冲区的内容android.permission.REMOVE_TASKS 停止正在运行的进程,恶意程序可以借此停止其他程序的运行android.permission.READ_EXTERNAL_STORAGEandroid.permission.REMOTE_AUDIO_PLAYBACKandroid.permission.START_ANY_ACTIVITY 允许应用启动任何活动(不考虑权限保护和导出状态)android.permission.SYSTEM_ALERT_WINDOW 在其他应用之上或用户界面的特定部分绘图,可能会干扰对用户界面的使用,或者使其他应用中看到的内容发生变化android.permission.SET_ORIENTATION允许底层访问设置屏幕方向和实际旋转(Allowslow-level access to setting the orientation (actually rotation) of the screen.)android.permission.STATUS_BAR允许程序打开、关闭或禁用状态栏及图标Allows an application to open, close, or disable the statusbar and its icons.android.permission.SET_SCREEN_COMPATIBILITY 允许控制其他应用的屏幕兼容模式,恶意程序可以借此影响其他应用的行为android.permission.START_ANY_ACTIVITY 允许应用启动任何活动(不考虑权限保护和导出状态) android.permission.STOP_APP_SWITCHES让应用程序始终运行android.permission.STATUS_BAR_SEBVICEandroid.permission.SHELLandroid.permission.UPDATE_DEVICE_STATS 允许应用修改电池的统计信息,普通应用绝不应该使用此权限android.permission. VIBRATE控制振动器android.permission.WRITE_EXTERNAL_STORAGE 允许写入或删除SD卡android.permission.WRITE_SETTINGS 修改系统设置,恶意程序可以借此破坏系统android.permission.WAKE_LOCK 阻止手机进入休眠状态。

Android(安卓)权限中文描述大全

Android(安卓)权限中文描述大全

Android(安卓)权限中⽂描述⼤全最新,最全,98%官⽅权限中⽂描述.⽹上流传的版本都不全或者描述的很不好,所以花费整整⼀晚上收集整理出来的(JSON格式).{"PermissList":[{"Key":"android.permission.ACCESS_CHECKIN_PROPERTIES","Title":"访问检⼊属性","Memo":"允许对检⼊服务上传的属性进⾏读/写访问。

普通应⽤程序不能使⽤此权限。

","Level":0},{"Key":"android.permission.ACCESS_COARSE_LOCATION","Title":"⼤概位置","Memo":"访问⼤概的位置源(例如蜂窝⽹络数据库)以确定⼿机的⼤概位置(如果可以)。

恶意应⽤程序可借此确定您所处的⼤概位置。

","Level":1},{"Key":"android.permission.ACCESS_FINE_LOCATION","Title":"精准的(GPS)位置","Memo":"访问精准的位置源,例如⼿机上的全球定位系统(如果有)。

恶意应⽤程序可能会借此确定您所处的位置,并可能消耗额外的电池电量。

", "Level":1},{"Key":"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS","Title":"访问额外的位置信息提供程序命令","Memo":"访问额外的位置信息提供程序命令。

Android应用的权限配置和权限列表

Android应用的权限配置和权限列表

Android应⽤的权限配置和权限列表权限配置写在Mainifest.xml⽂件中:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="/apk/res/android"package="com.example.mxmtxtreader"android:versionCode="1"android:versionName="1.0" ><uses-sdkandroid:minSdkVersion="14"android:targetSdkVersion="21" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.GET_PACKAGE_SIZE" /><applicationandroid:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@style/AppTheme" ><activityandroid:name=".BookActivity"android:label="@string/app_name" ><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="UNCHER" /></intent-filter></activity><activityandroid:name=".ReadingActivity"android:label="@string/app_name" ></activity><activityandroid:name=".ImportBook"android:label="@string/menu_import" ></activity></application></manifest>可配置的权限列表如下:访问登记属性android.permission.ACCESS_CHECKIN_PROPERTIES ,读取或写⼊登记check-in数据库属性表的权限获取错略位置android.permission.ACCESS_COARSE_LOCATION,通过WiFi或移动基站的⽅式获取⽤户错略的经纬度信息,定位精度⼤概误差在30~1500⽶获取精确位置android.permission.ACCESS_FINE_LOCATION,通过GPS芯⽚接收卫星的定位信息,定位精度达10⽶以内访问定位额外命令android.permission.ACCESS_LOCATION_EXTRA_COMMANDS,允许程序访问额外的定位提供者指令获取模拟定位信息android.permission.ACCESS_MOCK_LOCATION,获取模拟定位信息,⼀般⽤于帮助开发者调试应⽤获取⽹络状态android.permission.ACCESS_NETWORK_STATE,获取⽹络信息状态,如当前的⽹络连接是否有效访问Surface Flinger android.permission.ACCESS_SURFACE_FLINGER,Android平台上底层的图形显⽰⽀持,⼀般⽤于游戏或照相机预览界⾯和底层模式的屏幕截图获取WiFi状态android.permission.ACCESS_WIFI_STATE,获取当前WiFi接⼊的状态以及WLAN热点的信息账户管理android.permission.ACCOUNT_MANAGER,获取账户验证信息,主要为GMail账户信息,只有系统级进程才能访问的权限验证账户android.permission.AUTHENTICATE_ACCOUNTS,允许⼀个程序通过账户验证⽅式访问账户管理ACCOUNT_MANAGER相关信息电量统计android.permission.BATTERY_STATS,获取电池电量统计信息绑定⼩插件android.permission.BIND_APPWIDGET,允许⼀个程序告诉appWidget服务需要访问⼩插件的数据库,只有⾮常少的应⽤才⽤到此权限绑定设备管理android.permission.BIND_DEVICE_ADMIN,请求系统管理员接收者receiver,只有系统才能使⽤绑定输⼊法android.permission.BIND_INPUT_METHOD ,请求InputMethodService服务,只有系统才能使⽤绑定RemoteView android.permission.BIND_REMOTEVIEWS,必须通过RemoteViewsService服务来请求,只有系统才能⽤绑定壁纸android.permission.BIND_WALLPAPER,必须通过WallpaperService服务来请求,只有系统才能⽤使⽤蓝⽛android.permission.BLUETOOTH,允许程序连接配对过的蓝⽛设备蓝⽛管理android.permission.BLUETOOTH_ADMIN,允许程序进⾏发现和配对新的蓝⽛设备变成砖头android.permission.BRICK,能够禁⽤⼿机,⾮常危险,顾名思义就是让⼿机变成砖头应⽤删除时⼴播android.permission.BROADCAST_PACKAGE_REMOVED,当⼀个应⽤在删除时触发⼀个⼴播收到短信时⼴播android.permission.BROADCAST_SMS,当收到短信时触发⼀个⼴播连续⼴播android.permission.BROADCAST_STICKY,允许⼀个程序收到⼴播后快速收到下⼀个⼴播WAP PUSH⼴播android.permission.BROADCAST_WAP_PUSH,WAP PUSH服务收到后触发⼀个⼴播拨打电话android.permission.CALL_PHONE,允许程序从⾮系统拨号器⾥输⼊电话号码通话权限android.permission.CALL_PRIVILEGED,允许程序拨打电话,替换系统的拨号器界⾯拍照权限android.permission.CAMERA,允许访问摄像头进⾏拍照改变组件状态android.permission.CHANGE_COMPONENT_ENABLED_STATE,改变组件是否启⽤状态改变配置android.permission.CHANGE_CONFIGURATION,允许当前应⽤改变配置,如定位改变⽹络状态android.permission.CHANGE_NETWORK_STATE,改变⽹络状态如是否能联⽹android.permission.CHANGE_WIFI_MULTICAST_STATE,改变WiFi多播状态改变WiFi多播状态改变WiFi状态android.permission.CHANGE_WIFI_STATE,改变WiFi状态清除应⽤缓存android.permission.CLEAR_APP_CACHE,清除应⽤缓存清除⽤户数据android.permission.CLEAR_APP_USER_DATA,清除应⽤的⽤户数据底层访问权限android.permission.CWJ_GROUP,允许CWJ账户组访问底层信息android.permission.CELL_PHONE_MASTER_EX,⼿机优化⼤师扩展权限⼿机优化⼤师扩展权限控制定位更新android.permission.CONTROL_LOCATION_UPDATES,允许获得移动⽹络定位信息改变删除缓存⽂件android.permission.DELETE_CACHE_FILES,允许应⽤删除缓存⽂件删除应⽤android.permission.DELETE_PACKAGES,允许程序删除应⽤电源管理android.permission.DEVICE_POWER,允许访问底层电源管理应⽤诊断android.permission.DIAGNOSTIC,允许程序到RW到诊断资源禁⽤键盘锁android.permission.DISABLE_KEYGUARD,允许程序禁⽤键盘锁转存系统信息android.permission.DUMP,允许程序获取系统dump信息从系统服务状态栏控制android.permission.EXPAND_STATUS_BAR,允许程序扩展或收缩状态栏⼯⼚测试模式android.permission.FACTORY_TEST,允许程序运⾏⼯⼚测试模式使⽤闪光灯android.permission.FLASHLIGHT,允许访问闪光灯强制后退android.permission.FORCE_BACK,允许程序强制使⽤back后退按键,⽆论Activity是否在顶层android.permission.GET_ACCOUNTS,访问GMail账户列表访问账户Gmail列表获取应⽤⼤⼩android.permission.GET_PACKAGE_SIZE,获取应⽤的⽂件⼤⼩获取任务信息android.permission.GET_TASKS,允许程序获取当前或最近运⾏的应⽤允许全局搜索android.permission.GLOBAL_SEARCH,允许程序使⽤全局搜索功能硬件测试android.permission.HARDWARE_TEST,访问硬件辅助设备,⽤于硬件测试注射事件android.permission.INJECT_EVENTS,允许访问本程序的底层事件,获取按键、轨迹球的事件流安装定位提供android.permission.INSTALL_LOCATION_PROVIDER,安装定位提供安装应⽤程序android.permission.INSTALL_PACKAGES,允许程序安装应⽤内部系统窗⼝android.permission.INTERNAL_SYSTEM_WINDOW,允许程序打开内部窗⼝,不对第三⽅应⽤程序开放此权限访问⽹络android.permission.INTERNET,访问⽹络连接,可能产⽣GPRS流量结束后台进程android.permission.KILL_BACKGROUND_PROCESSES,允许程序调⽤killBackgroundProcesses(String).⽅法结束后台进程管理账户android.permission.MANAGE_ACCOUNTS,允许程序管理AccountManager中的账户列表管理程序引⽤android.permission.MANAGE_APP_TOKENS,管理创建、摧毁、Z轴顺序,仅⽤于系统⾼级权限android.permission.MTWEAK_USER,允许mTweak⽤户访问⾼级系统权限社区权限android.permission.MTWEAK_FORUM,允许使⽤mTweak社区权限软格式化android.permission.MASTER_CLEAR,允许程序执⾏软格式化,删除系统配置信息修改声⾳设置android.permission.MODIFY_AUDIO_SETTINGS,修改声⾳设置信息修改电话状态android.permission.MODIFY_PHONE_STATE,修改电话状态,如飞⾏模式,但不包含替换系统拨号器界⾯格式化⽂件系统android.permission.MOUNT_FORMAT_FILESYSTEMS,格式化可移动⽂件系统,⽐如格式化清空SD卡挂载⽂件系统android.permission.MOUNT_UNMOUNT_FILESYSTEMS,挂载、反挂载外部⽂件系统允许NFC通讯android.permission.NFC,允许程序执⾏NFC近距离通讯操作,⽤于移动⽀持永久Activity android.permission.PERSISTENT_ACTIVITY,创建⼀个永久的Activity,该功能标记为将来将被移除处理拨出电话android.permission.PROCESS_OUTGOING_CALLS,允许程序监视,修改或放弃播出电话读取⽇程提醒android.permission.READ_CALENDAR,允许程序读取⽤户的⽇程信息读取联系⼈android.permission.READ_CONTACTS,允许应⽤访问联系⼈通讯录信息屏幕截图android.permission.READ_FRAME_BUFFER,读取帧缓存⽤于屏幕截图com.android.browser.permission.READ_HISTORY_BOOKMARKS,读取浏览器收藏夹和历史记录读取收藏夹和历史记录读取输⼊状态android.permission.READ_INPUT_STATE,读取当前键的输⼊状态,仅⽤于系统读取系统⽇志android.permission.READ_LOGS,读取系统底层⽇志读取电话状态android.permission.READ_PHONE_STATE,访问电话状态读取短信内容android.permission.READ_SMS,读取短信内容读取同步设置android.permission.READ_SYNC_SETTINGS,读取同步设置,读取Google在线同步设置读取同步状态android.permission.READ_SYNC_STATS,读取同步状态,获得Google在线同步状态重启设备android.permission.REBOOT,允许程序重新启动设备开机⾃动允许android.permission.RECEIVE_BOOT_COMPLETED,允许程序开机⾃动运⾏接收彩信android.permission.RECEIVE_MMS,接收彩信接收短信android.permission.RECEIVE_SMS,接收短信接收Wap Push android.permission.RECEIVE_WAP_PUSH,接收WAP PUSH信息录⾳android.permission.RECORD_AUDIO,录制声⾳通过⼿机或⽿机的麦克排序系统任务android.permission.REORDER_TASKS,重新排序系统Z轴运⾏中的任务结束系统任务android.permission.RESTART_PACKAGES,结束任务通过restartPackage(String)⽅法,该⽅式将在外来放弃发送短信android.permission.SEND_SMS,发送短信android.permission.SET_ACTIVITY_WATCHER,设置Activity观察器⼀般⽤于monkey测试设置Activity观察其设置闹铃提醒com.android.alarm.permission.SET_ALARM,设置闹铃提醒设置总是退出android.permission.SET_ALWAYS_FINISH,设置程序在后台是否总是退出设置动画缩放android.permission.SET_ANIMATION_SCALE,设置全局动画缩放设置调试程序android.permission.SET_DEBUG_APP,设置调试程序,⼀般⽤于开发设置屏幕⽅向android.permission.SET_ORIENTATION,设置屏幕⽅向为横屏或标准⽅式显⽰,不⽤于普通应⽤设置应⽤参数android.permission.SET_PREFERRED_APPLICATIONS,设置应⽤的参数,已不再⼯作具体查看addPackageToPreferred(String) 介绍设置进程限制android.permission.SET_PROCESS_LIMIT,允许程序设置最⼤的进程数量的限制设置系统时间android.permission.SET_TIME,设置系统时间设置系统时区android.permission.SET_TIME_ZONE,设置系统时区设置桌⾯壁纸android.permission.SET_WALLPAPER,设置桌⾯壁纸设置壁纸建议android.permission.SET_WALLPAPER_HINTS,设置壁纸建议android.permission.SIGNAL_PERSISTENT_PROCESSES,发送⼀个永久的进程信号发送永久进程信号状态栏控制android.permission.STATUS_BAR,允许程序打开、关闭、禁⽤状态栏访问订阅内容android.permission.SUBSCRIBED_FEEDS_READ,访问订阅信息的数据库写⼊订阅内容android.permission.SUBSCRIBED_FEEDS_WRITE,写⼊或修改订阅内容的数据库显⽰系统窗⼝android.permission.SYSTEM_ALERT_WINDOW,显⽰系统窗⼝更新设备状态android.permission.UPDATE_DEVICE_STATS,更新设备状态使⽤证书E_CREDENTIALS,允许程序请求验证从AccountManager使⽤SIP视频E_SIP,允许程序使⽤SIP视频服务使⽤振动android.permission.VIBRATE,允许振动唤醒锁定android.permission.WAKE_LOCK,允许程序在⼿机屏幕关闭后后台进程仍然运⾏android.permission.WRITE_APN_SETTINGS,写⼊⽹络GPRS接⼊点设置写⼊GPRS接⼊点设置写⼊⽇程提醒android.permission.WRITE_CALENDAR,写⼊⽇程,但不可读取写⼊联系⼈android.permission.WRITE_CONTACTS,写⼊联系⼈,但不可读取写⼊外部存储android.permission.WRITE_EXTERNAL_STORAGE,允许程序写⼊外部存储,如SD卡上写⽂件android.permission.WRITE_GSERVICES,允许程序写⼊Google Map服务数据写⼊Google地图数据com.android.browser.permission.WRITE_HISTORY_BOOKMARKS,写⼊浏览器历史记录或收藏夹,但不可读取写⼊收藏夹和历史记录android.permission.WRITE_SECURE_SETTINGS,允许程序读写系统安全敏感的设置项读写系统敏感设置读写系统设置android.permission.WRITE_SETTINGS,允许读写系统设置项编写短信android.permission.WRITE_SMS,允许编写短信android.permission.WRITE_SYNC_SETTINGS,写⼊Google在线同步设置写⼊在线同步设置。

Android动态获取系统权限+调用外部应用读取本地文件(TBS+自定义)

Android动态获取系统权限+调用外部应用读取本地文件(TBS+自定义)

Android动态获取系统权限+调⽤外部应⽤读取本地⽂件(TBS+⾃定义)⼀、获取动态权限1.创建Android应⽤,在配置⽂件中添加临时访问⽂件权限<!-- android 7.0临时赋予访问权限 android:name="android.support.v4.content.FileProvider" --><providerandroid:name="androidx.core.content.FileProvider"android:authorities="com.example.build_input"android:exported="false"android:grantUriPermissions="true"><meta-dataandroid:name="android.support.FILE_PROVIDER_PATHS"android:resource="@xml/file_paths"/></provider>新建xml⽂件,配置name和path路径<?xml version="1.0" encoding="utf-8"?><paths><!-- name随便起--><external-pathname="camera_photos"path="/"/></paths>2.配置系统需要⽤到的系统权限<!-- 向SD卡写⼊数据权限 --><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/><uses-permissionandroid:name="android.permission.WRITE_SETTINGS"tools:ignore="ProtectedPermissions"/>3.编写申请动态权限⽅法,在onCreate()⽅法中调⽤//申请权限private boolean getPermission(Activity activity){boolean rs=false;// 声明⼀个集合,在后⾯的代码中⽤来存储⽤户拒绝授权的权List<String> permissionList = new ArrayList<>();String[] permissions = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE,//读取内存卡Manifest.permission.WRITE_EXTERNAL_STORAGE,//写⼊内存卡// Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS,//允许挂载和反挂载⽂件系统可移动存储// Manifest.permission.READ_PHONE_STATE,//读取⼿机状态和⾝份/* Manifest.permission.ACCESS_WIFI_STATE,//获取使⽤Wi-Fi等WLAN⽆线⽹络Manifest.permission.CHANGE_WIFI_STATE,//允许程序改变Wi-Fi连接状态Manifest.permission.ACCESS_NETWORK_STATE,//允许程序访问有关GSM⽹络信息Manifest.permission.CHANGE_NETWORK_STATE,//允许程序改变⽹络连接状态Manifest.permission.INTERNET,//访问⽹络连接,可能产⽣GPRS流量Manifest.permission.BLUETOOTH,//允许程序连接到已配对的蓝⽛设备Manifest.permission.CAMERA,//相机Manifest.permission.WRITE_SETTINGS,//允许程序读取或写⼊系统设置*/};permissionList.clear();for (int i = 0; i < permissions.length; i++) {if (ContextCompat.checkSelfPermission(activity, permissions[i]) != PackageManager.PERMISSION_GRANTED) {Log.e(TAG,"权限未允许:"+permissions[i]+"....");permissionList.add(permissions[i]);}}if (permissionList.isEmpty()) {//未授予的权限为空,表⽰都授予了Log.e(TAG,"已经获取到了所有权限");return true;} else {//请求权限⽅法String[] spermissions = permissionList.toArray(new String[permissionList.size()]);//将List转为数组ActivityCompat.requestPermissions(activity, spermissions, 1);}return rs;}4.处理授权回调@Overridepublic void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {super.onRequestPermissionsResult(requestCode, permissions, grantResults);if(requestCode==1){if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {boolean request_rs=true;for(int i=0;i<grantResults.length;i++){if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {request_rs=false;}}if(request_rs){Log.e("软件获取权限结果:","获取软件权限成功");init();}else{Toast.makeText(this, "您拒绝了软件应⽤权限,因此⽆法使⽤该软件!", Toast.LENGTH_LONG).show(); showDialogTipUserGoToAppSettting();}}}}若未获取的权限,则提醒⽤户⼿动开启权限/*** 提⽰⽤户去应⽤设置界⾯⼿动开启权限*/private void showDialogTipUserGoToAppSettting() {new AlertDialog.Builder(this).setTitle("存储权限不可⽤").setMessage("请在-应⽤设置-权限-中,允许应⽤使⽤存储权限来保存⽤户数据").setPositiveButton("⽴即开启", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {// 跳转到应⽤设置界⾯goToAppSetting();android.os.Process.killProcess(android.os.Process.myPid());}}).setNegativeButton("取消", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {android.os.Process.killProcess(android.os.Process.myPid());}}).setCancelable(false).show();}/*** 跳转到当前应⽤的设置界⾯*/private void goToAppSetting() {Intent intent = new Intent();intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);Uri uri = Uri.fromParts("package", getPackageName(), null);intent.setData(uri);startActivityForResult(intent, 123);}⼆、调⽤应⽤打开本地⽂件第⼀种,根据⽂件类型⾃动选取应⽤打开⽂件1.创建⽂件类型数组/*** -- MIME 列表 --*/public static final String[][] MIME_MapTable = {// --{后缀名, MIME类型} --{".3gp", "video/3gpp"},{".3gpp", "video/3gpp"},{".aac", "audio/x-mpeg"},{".amr", "audio/x-mpeg"},{".apk", "application/vnd.android.package-archive"},{".avi", "video/x-msvideo"},{".aab", "application/x-authoware-bin"},{".aam", "application/x-authoware-map"},{".aas", "application/x-authoware-seg"},{".ai", "application/postscript"},{".aif", "audio/x-aiff"},{".aifc", "audio/x-aiff"},{".aiff", "audio/x-aiff"},{".als", "audio/x-alpha5"},{".amc", "application/x-mpeg"},{".ani", "application/octet-stream"},{".asc", "text/plain"},{".asd", "application/astound"},{".asf", "video/x-ms-asf"},{".asn", "application/astound"},{".asp", "application/x-asap"},{".asx", " video/x-ms-asf"},{".avb", "application/octet-stream"},{".awb", "audio/amr-wb"},{".bcpio", "application/x-bcpio"},{".bld", "application/bld"},{".bld2", "application/bld2"},{".bpk", "application/octet-stream"},{".bz2", "application/x-bzip2"},{".bin", "application/octet-stream"},{".bmp", "image/bmp"},{".c", "text/plain"},{".class", "application/octet-stream"},{".conf", "text/plain"},{".cpp", "text/plain"},{".cal", "image/x-cals"},{".ccn", "application/x-cnc"},{".cco", "application/x-cocoa"},{".cdf", "application/x-netcdf"},{".cgi", "magnus-internal/cgi"},{".chat", "application/x-chat"},{".clp", "application/x-msclip"},{".cmx", "application/x-cmx"},{".co", "application/x-cult3d-object"},{".cod", "image/cis-cod"},{".cpio", "application/x-cpio"},{".cpt", "application/mac-compactpro"},{".crd", "application/x-mscardfile"},{".csh", "application/x-csh"},{".csm", "chemical/x-csml"},{".csml", "chemical/x-csml"},{".css", "text/css"},{".cur", "application/octet-stream"},{".doc", "application/msword"},{".dcm", "x-lml/x-evm"},{".dcr", "application/x-director"},{".dcx", "image/x-dcx"},{".dhtml", "text/html"},{".dir", "application/x-director"},{".dll", "application/octet-stream"},{".dmg", "application/octet-stream"},{".dms", "application/octet-stream"},{".dot", "application/x-dot"},{".dvi", "application/x-dvi"},{".dwf", "drawing/x-dwf"},{".dwg", "application/x-autocad"},{".dxf", "application/x-autocad"},{".dxr", "application/x-director"},{".ebk", "application/x-expandedbook"}, {".emb", "chemical/x-embl-dl-nucleotide"}, {".embl", "chemical/x-embl-dl-nucleotide"}, {".eps", "application/postscript"},{".epub", "application/epub+zip"},{".eri", "image/x-eri"},{".es", "audio/echospeech"},{".esl", "audio/echospeech"},{".etc", "application/x-earthtime"},{".etx", "text/x-setext"},{".evm", "x-lml/x-evm"},{".evy", "application/x-envoy"},{".exe", "application/octet-stream"},{".fh4", "image/x-freehand"},{".fh5", "image/x-freehand"},{".fhc", "image/x-freehand"},{".fif", "image/fif"},{".fm", "application/x-maker"},{".fpx", "image/x-fpx"},{".fvi", "video/isivideo"},{".flv", "video/x-msvideo"},{".gau", "chemical/x-gaussian-input"},{".gca", "application/x-gca-compressed"}, {".gdb", "x-lml/x-gdb"},{".gif", "image/gif"},{".gps", "application/x-gps"},{".gtar", "application/x-gtar"},{".gz", "application/x-gzip"},{".gif", "image/gif"},{".gtar", "application/x-gtar"},{".gz", "application/x-gzip"},{".h", "text/plain"},{".hdf", "application/x-hdf"},{".hdm", "text/x-hdml"},{".hdml", "text/x-hdml"},{".htm", "text/html"},{".html", "text/html"},{".hlp", "application/winhlp"},{".hqx", "application/mac-binhex40"},{".hts", "text/html"},{".ice", "x-conference/x-cooltalk"},{".ico", "application/octet-stream"},{".ifm", "image/gif"},{".ifs", "image/ifs"},{".imy", "audio/melody"},{".ins", "application/x-net-install"},{".ips", "application/x-ipscript"},{".ipx", "application/x-ipix"},{".it", "audio/x-mod"},{".itz", "audio/x-mod"},{".ivr", "i-world/i-vrml"},{".j2k", "image/j2k"},{".jad", "text/vnd.sun.j2me.app-descriptor"},{".jam", "application/x-jam"},{".jnlp", "application/x-java-jnlp-file"},{".jpe", "image/jpeg"},{".jpz", "image/jpeg"},{".jwc", "application/jwc"},{".jar", "application/java-archive"},{".java", "text/plain"},{".jpeg", "image/jpeg"},{".jpg", "image/jpeg"},{".js", "application/x-javascript"},{".kjx", "application/x-kjx"},{".lak", "x-lml/x-lak"},{".latex", "application/x-latex"},{".lcc", "application/fastman"},{".lcl", "application/x-digitalloca"},{".lcr", "application/x-digitalloca"},{".lgh", "application/lgh"},{".lha", "application/octet-stream"},{".lml", "x-lml/x-lml"},{".lmlpack", "x-lml/x-lmlpack"},{".log", "text/plain"},{".lsf", "video/x-ms-asf"},{".lsx", "video/x-ms-asf"},{".lzh", "application/x-lzh "},{".m13", "application/x-msmediaview"},{".m14", "application/x-msmediaview"},{".m15", "audio/x-mod"},{".m3u", "audio/x-mpegurl"},{".m3url", "audio/x-mpegurl"},{".ma1", "audio/ma1"},{".ma2", "audio/ma2"},{".ma3", "audio/ma3"},{".ma5", "audio/ma5"},{".man", "application/x-troff-man"},{".map", "magnus-internal/imagemap"},{".mbd", "application/mbedlet"},{".mct", "application/x-mascot"},{".mdb", "application/x-msaccess"},{".mdz", "audio/x-mod"},{".me", "application/x-troff-me"},{".mel", "text/x-vmel"},{".mi", "application/x-mif"},{".mid", "audio/midi"},{".midi", "audio/midi"},{".m4a", "audio/mp4a-latm"},{".m4b", "audio/mp4a-latm"},{".m4p", "audio/mp4a-latm"},{".m4u", "video/vnd.mpegurl"},{".m4v", "video/x-m4v"},{".mov", "video/quicktime"},{".mp2", "audio/x-mpeg"},{".mp3", "audio/x-mpeg"},{".mp4", "video/mp4"},{".mpc", "application/vnd.mpohun.certificate"}, {".mpe", "video/mpeg"},{".mpeg", "video/mpeg"},{".mpg", "video/mpeg"},{".mpg4", "video/mp4"},{".mpga", "audio/mpeg"},{".msg", "application/vnd.ms-outlook"},{".mif", "application/x-mif"},{".mil", "image/x-cals"},{".mio", "audio/x-mio"},{".mmf", "application/x-skt-lbs"},{".mng", "video/x-mng"},{".mny", "application/x-msmoney"},{".moc", "application/x-mocha"},{".mocha", "application/x-mocha"},{".mod", "audio/x-mod"},{".mof", "application/x-yumekara"},{".mol", "chemical/x-mdl-molfile"},{".mop", "chemical/x-mopac-input"},{".movie", "video/x-sgi-movie"},{".mpn", "application/vnd.mophun.application"}, {".mpp", "application/vnd.ms-project"},{".mps", "application/x-mapserver"},{".mrl", "text/x-mrml"},{".mrm", "application/x-mrm"},{".ms", "application/x-troff-ms"},{".mts", "application/metastream"},{".mtx", "application/metastream"},{".mtz", "application/metastream"},{".mzv", "application/metastream"},{".nar", "application/zip"},{".nbmp", "image/nbmp"},{".nc", "application/x-netcdf"},{".ndb", "x-lml/x-ndb"},{".ndwn", "application/ndwn"},{".nif", "application/x-nif"},{".nmz", "application/x-scream"},{".nokia-op-logo", "image/vnd.nok-oplogo-color"}, {".npx", "application/x-netfpx"},{".nsnd", "audio/nsnd"},{".nva", "application/x-neva1"},{".oda", "application/oda"},{".oom", "application/x-atlasMate-plugin"},{".ogg", "audio/ogg"},{".pac", "audio/x-pac"},{".pae", "audio/x-epac"},{".pan", "application/x-pan"},{".pbm", "image/x-portable-bitmap"},{".pcx", "image/x-pcx"},{".pda", "image/x-pda"},{".pdb", "chemical/x-pdb"},{".pdf", "application/pdf"},{".pfr", "application/font-tdpfr"},{".pgm", "image/x-portable-graymap"},{".pict", "image/x-pict"},{".pm", "application/x-perl"},{".pmd", "application/x-pmd"},{".png", "image/png"},{".pnm", "image/x-portable-anymap"},{".pnz", "image/png"},{".pot", "application/vnd.ms-powerpoint"},{".ppm", "image/x-portable-pixmap"},{".pps", "application/vnd.ms-powerpoint"},{".ppt", "application/vnd.ms-powerpoint"},{".pqf", "application/x-cprplayer"},{".pqi", "application/cprplayer"},{".prc", "application/x-prc"},{".proxy", "application/x-ns-proxy-autoconfig"},{".prop", "text/plain"},{".ps", "application/postscript"},{".ptlk", "application/listenup"},{".pub", "application/x-mspublisher"},{".pvx", "video/x-pv-pvx"},{".qcp", "audio/vnd.qcelp"},{".qt", "video/quicktime"},{".qti", "image/x-quicktime"},{".qtif", "image/x-quicktime"},{".r3t", "text/vnd.rn-realtext3d"},{".ra", "audio/x-pn-realaudio"},{".ram", "audio/x-pn-realaudio"},{".ras", "image/x-cmu-raster"},{".rdf", "application/rdf+xml"},{".rf", "image/vnd.rn-realflash"},{".rgb", "image/x-rgb"},{".rlf", "application/x-richlink"},{".rm", "audio/x-pn-realaudio"},{".rmf", "audio/x-rmf"},{".rmm", "audio/x-pn-realaudio"},{".rnx", "application/vnd.rn-realplayer"},{".roff", "application/x-troff"},{".rp", "image/vnd.rn-realpix"},{".rpm", "audio/x-pn-realaudio-plugin"},{".rt", "text/vnd.rn-realtext"},{".rte", "x-lml/x-gps"},{".rtf", "application/rtf"},{".rtg", "application/metastream"},{".rtx", "text/richtext"},{".rv", "video/vnd.rn-realvideo"},{".rwc", "application/x-rogerwilco"},{".rar", "application/x-rar-compressed"},{".rc", "text/plain"},{".rmvb", "audio/x-pn-realaudio"},{".s3m", "audio/x-mod"},{".s3z", "audio/x-mod"},{".sca", "application/x-supercard"},{".scd", "application/x-msschedule"},{".sdf", "application/e-score"},{".sea", "application/x-stuffit"},{".sgm", "text/x-sgml"},{".sgml", "text/x-sgml"},{".shar", "application/x-shar"},{".shtml", "magnus-internal/parsed-html"},{".shw", "application/presentations"},{".si6", "image/si6"},{".si7", "image/vnd.stiwap.sis"},{".si9", "image/vnd.lgtwap.sis"},{".sis", "application/vnd.symbian.install"},{".sit", "application/x-stuffit"},{".skd", "application/x-koan"},{".skm", "application/x-koan"},{".skp", "application/x-koan"},{".skt", "application/x-koan"},{".slc", "application/x-salsa"},{".smd", "audio/x-smd"},{".smi", "application/smil"},{".smil", "application/smil"},{".smp", "application/studiom"},{".smz", "audio/x-smd"},{".sh", "application/x-sh"},{".snd", "audio/basic"},{".spc", "text/x-speech"},{".spl", "application/futuresplash"},{".spr", "application/x-sprite"},{".sprite", "application/x-sprite"},{".sdp", "application/sdp"},{".spt", "application/x-spt"},{".src", "application/x-wais-source"},{".stk", "application/hyperstudio"},{".stm", "audio/x-mod"},{".sv4cpio", "application/x-sv4cpio"},{".sv4crc", "application/x-sv4crc"},{".svf", "image/vnd"},{".svg", "image/svg-xml"},{".svh", "image/svh"},{".svr", "x-world/x-svr"},{".swf", "application/x-shockwave-flash"},{".swfl", "application/x-shockwave-flash"}, {".t", "application/x-troff"},{".tad", "application/octet-stream"},{".talk", "text/x-speech"},{".tar", "application/x-tar"},{".taz", "application/x-tar"},{".tbp", "application/x-timbuktu"},{".tbt", "application/x-timbuktu"},{".tcl", "application/x-tcl"},{".tex", "application/x-tex"},{".texi", "application/x-texinfo"},{".texinfo", "application/x-texinfo"},{".tgz", "application/x-tar"},{".thm", "application/vnd.eri.thm"},{".tif", "image/tiff"},{".tiff", "image/tiff"},{".tki", "application/x-tkined"},{".tkined", "application/x-tkined"},{".toc", "application/toc"},{".toy", "image/toy"},{".tr", "application/x-troff"},{".trk", "x-lml/x-gps"},{".trm", "application/x-msterminal"},{".tsi", "audio/tsplayer"},{".tsp", "application/dsptype"},{".tsv", "text/tab-separated-values"},{".ttf", "application/octet-stream"},{".ttz", "application/t-time"},{".txt", "text/plain"},{".ult", "audio/x-mod"},{".ustar", "application/x-ustar"},{".uu", "application/x-uuencode"},{".uue", "application/x-uuencode"},{".vcd", "application/x-cdlink"},{".vcf", "text/x-vcard"},{".vdo", "video/vdo"},{".vib", "audio/vib"},{".viv", "video/vivo"},{".vivo", "video/vivo"},{".vmd", "application/vocaltec-media-desc"}, {".vmf", "application/vocaltec-media-file"}, {".vmi", "application/x-dreamcast-vms-info"}, {".vms", "application/x-dreamcast-vms"},{".vox", "audio/voxware"},{".vqe", "audio/x-twinvq-plugin"},{".vqf", "audio/x-twinvq"},{".vql", "audio/x-twinvq"},{".vre", "x-world/x-vream"},{".vrml", "x-world/x-vrml"},{".vrt", "x-world/x-vrt"},{".vrw", "x-world/x-vream"},{".vts", "workbook/formulaone"},{".wax", "audio/x-ms-wax"},{".wbmp", "image/vnd.wap.wbmp"},{".web", "application/vnd.xara"},{".wav", "audio/x-wav"},{".wma", "audio/x-ms-wma"},{".wmv", "audio/x-ms-wmv"},{".wi", "image/wavelet"},{".wis", "application/x-InstallShield"},{".wm", "video/x-ms-wm"},{".wmd", "application/x-ms-wmd"},{".wmf", "application/x-msmetafile"},{".wml", "text/vnd.wap.wml"},{".wmlc", "application/vnd.wap.wmlc"},{".wmls", "text/vnd.wap.wmlscript"},{".wmlsc", "application/vnd.wap.wmlscriptc"},{".wmlscript", "text/vnd.wap.wmlscript"},{".wmv", "video/x-ms-wmv"},{".wmx", "video/x-ms-wmx"},{".wmz", "application/x-ms-wmz"},{".wpng", "image/x-up-wpng"},{".wps", "application/vnd.ms-works"},{".wpt", "x-lml/x-gps"},{".wri", "application/x-mswrite"},{".wrl", "x-world/x-vrml"},{".wrz", "x-world/x-vrml"},{".ws", "text/vnd.wap.wmlscript"},{".wsc", "application/vnd.wap.wmlscriptc"},{".wv", "video/wavelet"},{".wvx", "video/x-ms-wvx"},{".wxl", "application/x-wxl"},{".x-gzip", "application/x-gzip"},{".xar", "application/vnd.xara"},{".xbm", "image/x-xbitmap"},{".xdm", "application/x-xdma"},{".xdma", "application/x-xdma"},{".xdw", "application/vnd.fujixerox.docuworks"},{".xht", "application/xhtml+xml"},{".xhtm", "application/xhtml+xml"},{".xhtml", "application/xhtml+xml"},{".xla", "application/vnd.ms-excel"},{".xlc", "application/vnd.ms-excel"},{".xll", "application/x-excel"},{".xlm", "application/vnd.ms-excel"},{".xls", "application/vnd.ms-excel"},{".xlsx", "application/vnd.ms-excel"},// {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, 07{".xlt", "application/vnd.ms-excel"},{".xlw", "application/vnd.ms-excel"},{".xm", "audio/x-mod"},{".xml", "text/xml"},{".xmz", "audio/x-mod"},{".xpi", "application/x-xpinstall"},{".xpm", "image/x-xpixmap"},{".xsit", "text/xml"},{".xsl", "text/xml"},{".xul", "text/xul"},{".xwd", "image/x-xwindowdump"},{".xyz", "chemical/x-pdb"},{".yz1", "application/x-yz1"},{".z", "application/x-compress"},{".zac", "application/x-zaurus-zac"},{".zip", "application/zip"},{"", "*/*"}};2.获取File⽂件路径,⾃定义打开⽂件try {Intent intent = new Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(Intent.ACTION_VIEW);//Uri.fromFile(new File()) 会出现乱码intent.setDataAndType(Uri.parse(Uri.decode(url)), FilePath.getMIMEType(url); startActivity(intent);Intent.createChooser(intent, "请选择对应的软件打开该附件!");} catch (ActivityNotFoundException e) {Toast.makeText(MainActivity.this, "附件打开失败,请下载相关软件!", Toast.LENGTH_SHORT).show(); }/*** --获取⽂件类型 --*/public static String getMIMEType(String filePath) {String type = "*/*";String fName = filePath;int dotIndex = stIndexOf(".");if (dotIndex < 0) {return type;}。

android权限(permission)大全

android权限(permission)大全

android权限(permission)⼤全1.android.permission.WRITE_USER_DICTIONARY允许应⽤程序向⽤户词典中写⼊新词2.android.permission.WRITE_SYNC_SETTINGS写⼊Google在线同步设置3.android.permission.WRITE_SOCIAL_STREAM读取⽤户的社交信息流4.android.permission.WRITE_SMS允许程序写短信5.android.permission.WRITE_SETTINGS允许程序读取或写⼊系统设置6.android.permission.WRITE_SECURE_SETTINGS允许应⽤程序读取或写⼊安全系统设置7.android.permission.WRITE_PROFILE允许程序写⼊个⼈资料数据.android.browser.permission.WRITE_HISTORY_BOOKMARKS允许⼀个应⽤程序写(但不可读)⽤户的浏览历史和书签9.android.permission.WRITE_GSERVICES允许程序修改Google服务地图10.android.permission.WRITE_EXTERNAL_STORAGE允许程序写⼊外部存储,如SD卡上写⽂件11.android.permission.WRITE_CONTACTS写⼊联系⼈,但不可读取12.android.permission.WRITE_CALL_LOG允许程序写⼊(但是不能读)⽤户的联系⼈数据13.android.permission.WRITE_CALENDAR允许程序写⼊⽇程,但不可读取14.android.permission.WRITE_APN_SETTINGS允许程序写⼊⽹络GPRS接⼊点设置15.android.permission.WAKE_LOCK允许程序在⼿机屏幕关闭后后台进程仍然运⾏16.android.permission.VIBRATE允许程序振动E_SIP允许程序使⽤SIP视频服务E_CREDENTIALS允许程序请求验证从AccountManager19.android.permission.UPDATE_DEVICE_STATS允许程序更新设备状态uncher.permission.UNINSTALL_SHORTCUT删除快捷⽅式21.android.permission.TRANSMIT_IR允许使⽤设备的红外发射器,如果可⽤22.android.permission.SYSTEM_ALERT_WINDOW允许程序显⽰系统窗⼝23.android.permission.SUBSCRIBED_FEEDS_WRITE允许程序写⼊或修改订阅内容的数据库24.android.permission.SUBSCRIBED_FEEDS_READ允许程序访问订阅信息的数据库22.android.permission.STATUS_BAR允许程序打开、关闭、禁⽤状态栏23.android.permission.SIGNAL_PERSISTENT_PROCESSES允许程序发送⼀个永久的进程信号24.android.permission.SET_WALLPAPER_HINTS允许程序设置壁纸建议26.android.permission.SET_TIME_ZONE允许程序设置系统时区27.android.permission.SET_TIME允许程序设置系统时间28.android.permission.SET_PROCESS_LIMIT允许程序设置最⼤的进程数量的限制29.android.permission.SET_PREFERRED_APPLICATIONS允许程序设置应⽤的参数,已不再⼯作具体查看addPackageToPreferred(String) 介绍30.android.permission.SET_POINTER_SPEED⽆法被第三⽅应⽤获得,系统权限31.android.permission.SET_ORIENTATION允许程序设置屏幕⽅向为横屏或标准⽅式显⽰,不⽤于普通应⽤32.android.permission.SET_DEBUG_APP允许程序设置调试程序,⼀般⽤于开发33.android.permission.SET_ANIMATION_SCALE允许程序设置全局动画缩放34.android.permission.SET_ALWAYS_FINISH允许程序设置程序在后台是否总是退出.android.alarm.permission.SET_ALARM允许程序设置闹铃提醒37.android.permission.SET_ACTIVITY_WATCHER允许程序设置Activity观察器⼀般⽤于monkey测试38.android.permission.SEND_SMS允许程序发送短信39.android.permission.SEND_RESPOND_VIA_MESSAGE允许⽤户在来电的时候⽤你的应⽤进⾏即时的短信息回复。

android权限(permission)大全

android权限(permission)大全

android权限(permission)⼤全权限添加位置:权限代码:1.android.permission.WRITE_USER_DICTIONARY允许应⽤程序向⽤户词典中写⼊新词2.android.permission.WRITE_SYNC_SETTINGS写⼊Google在线同步设置3.android.permission.WRITE_SOCIAL_STREAM读取⽤户的社交信息流4.android.permission.WRITE_SMS允许程序写短信5.android.permission.WRITE_SETTINGS允许程序读取或写⼊系统设置6.android.permission.WRITE_SECURE_SETTINGS允许应⽤程序读取或写⼊安全系统设置7.android.permission.WRITE_PROFILE允许程序写⼊个⼈资料数据.android.browser.permission.WRITE_HISTORY_BOOKMARKS允许⼀个应⽤程序写(但不可读)⽤户的浏览历史和书签9.android.permission.WRITE_GSERVICES允许程序修改Google服务地图10.android.permission.WRITE_EXTERNAL_STORAGE允许程序写⼊外部存储,如SD卡上写⽂件11.android.permission.WRITE_CONTACTS写⼊联系⼈,但不可读取12.android.permission.WRITE_CALL_LOG允许程序写⼊(但是不能读)⽤户的联系⼈数据13.android.permission.WRITE_CALENDAR允许程序写⼊⽇程,但不可读取14.android.permission.WRITE_APN_SETTINGS允许程序写⼊⽹络GPRS接⼊点设置15.android.permission.WAKE_LOCK允许程序在⼿机屏幕关闭后后台进程仍然运⾏16.android.permission.VIBRATE允许程序振动E_SIP允许程序使⽤SIP视频服务E_CREDENTIALS允许程序请求验证从AccountManager19.android.permission.UPDATE_DEVICE_STATS允许程序更新设备状态uncher.permission.UNINSTALL_SHORTCUT删除快捷⽅式21.android.permission.TRANSMIT_IR允许使⽤设备的红外发射器,如果可⽤22.android.permission.SYSTEM_ALERT_WINDOW允许程序显⽰系统窗⼝23.android.permission.SUBSCRIBED_FEEDS_WRITE允许程序写⼊或修改订阅内容的数据库24.android.permission.SUBSCRIBED_FEEDS_READ允许程序访问订阅信息的数据库22.android.permission.STATUS_BAR允许程序打开、关闭、禁⽤状态栏23.android.permission.SIGNAL_PERSISTENT_PROCESSES允许程序发送⼀个永久的进程信号24.android.permission.SET_WALLPAPER_HINTS允许程序设置壁纸建议25.android.permission.SET_WALLPAPER允许程序设置桌⾯壁纸26.android.permission.SET_TIME_ZONE允许程序设置系统时区27.android.permission.SET_TIME允许程序设置系统时间28.android.permission.SET_PROCESS_LIMIT允许程序设置最⼤的进程数量的限制29.android.permission.SET_PREFERRED_APPLICATIONS允许程序设置应⽤的参数,已不再⼯作具体查看addPackageToPreferred(String) 介绍30.android.permission.SET_POINTER_SPEED⽆法被第三⽅应⽤获得,系统权限31.android.permission.SET_ORIENTATION允许程序设置屏幕⽅向为横屏或标准⽅式显⽰,不⽤于普通应⽤32.android.permission.SET_DEBUG_APP允许程序设置调试程序,⼀般⽤于开发33.android.permission.SET_ANIMATION_SCALE允许程序设置全局动画缩放34.android.permission.SET_ALWAYS_FINISH允许程序设置程序在后台是否总是退出.android.alarm.permission.SET_ALARM允许程序设置闹铃提醒37.android.permission.SET_ACTIVITY_WATCHER允许程序设置Activity观察器⼀般⽤于monkey测试38.android.permission.SEND_SMS允许程序发送短信39.android.permission.SEND_RESPOND_VIA_MESSAGE允许⽤户在来电的时候⽤你的应⽤进⾏即时的短信息回复。

详解Android权限管理之RxPermission解决Android6.0适配问题

详解Android权限管理之RxPermission解决Android6.0适配问题

详解Android权限管理之RxPermission解决Android6.0适配问题前⾔:上篇重点学习了Android 6.0的运⾏时权限,今天还是围绕着Android 6.0权限适配来总结学习,这⾥主要介绍⼀下我们公司解决Android 6.0权限适配的⽅案:RxJava+RxPermission。

这⾥不再介绍Android 6.0运⾏时权限了,直接看下如何使⽤RxPermission。

RxPermission:⽤于适配Android 6.0新的权限模型的开源框架。

下载地址:如何使⽤?1.)在app module的build.gradle中添加如下配置使⽤该开源框架minSdkVersion 必须⼩于9repositories {jcenter() // If not already there}dependencies {compile 'com.tbruyelle.rxpermissions:rxpermissions:0.9.0@aar'}如果使⽤的RxJava2的话使⽤下⾯的配置与RxJava不同的是包名变成了com.tbruyelle.rxpermissions2,不过说实话RxJava2我还没使⽤过。

dependencies {compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.8.2@aar'}2.)直接申请权限使⽤RxPermissions.getInstance(this)是以单例的形式使⽤的,这⾥以申请拍照权限为例RxPermissions.getInstance(this).request(permissions).subscribe(new Action1<Boolean>() {@Overridepublic void call(Boolean granted) {if (granted) { // 在android 6.0之前会默认返回true// 已经获取权限String jpgPath = getCacheDir() + "test.jpg";takePhotoByPath(jpgPath, 2);} else {// 未获取权限Toast.makeText(MainActivity.this, "您没有授权该权限,请在设置中打开授权", Toast.LENGTH_SHORT).show();}}});这⾥直接返回是否授权,我们可以根据这个值进⾏不同的处理。

安卓手机权限设置

安卓手机权限设置

Android 是开放式的系统,G1自带的一部分程序可以删除(前提是手机要有ROOT权限),有的坚决不能删除,注意:手机删除自带程序后有的系统可能会失去硬启功能,如果系统出问题只能刷机解决,(如果备份了系统,可以进行系统恢复),想删除自带程序的朋友必须学会刷机。

我们要用到Root Explorer (高级资源管理器,百度中可以下载到),这个软件要求手机有权限,Root Explorer 的软件安装后,打开会弹出提示,这时候选择“总是同意”如何出现文件夹(没出现,就要重启,应该重启一次,我的就是)接着在文件目录中找到“system”文件夹和“data”文件夹并点击进入。

进入“system”文件夹后再进入“APP”文件夹这时候大家就会看到这里有很多以APk结尾的文件;首先要先点击下右上角的Remount as R/W ,点击后这个按钮就会变成Remount as R/O。

这就说明我们已经获取读写权限了!以系统自带的平衡球游戏—Teeter为例。

我们要先找到Teeter.apk。

然后长按文件名就会弹出对话框,选择Delete就可以删除该程序了,当程序弹出对话框件,选择Y es ,用同样的方法进入“data”文件夹里的“data”文件夹删除Teeter.odex文件。

(记住删除俩个哦)当Teeter.apk与Teeter.odex这两个文件都被删除,system”里还有个media文件夹,media文件夹里还有四个文件夹,是铃声,短信,闹钟,相机声音文件夹,我可以把四个文件夹复制到SD的根目录下(复制到卡后,可以保留几闹钟音和相机声音,其他的铃音删除后,把自己喜欢的放进来OK,提醒:相机声音会很小,几乎听不见,其他还可以,),然后可以把整个media文件夹删除,这样大家就可以把自己喜欢的mp3歌曲当铃声了(记得你要先把那四个文件复制到sdcard里啊)退出时注意:我们还要再点击下Remount as R/O把读取权限改为只读,以免误操作!重启手机,看看是不是有变化。

Android设备开发文档说明书

Android设备开发文档说明书

1) What is Android?It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.2) What Is the Google Android SDK?The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes.3) What is the Android Architecture?Android Architecture is made up of 4 key components:- Linux Kernel- Libraries- Android Framework- Android Applications4) Describe the Android Framework.The Android Framework is an important aspect of the Android Architecture. Here you can find all the classes and methods that developers would need in order to write applications on the Android environment.5) What is AAPT?AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.6) What is the importance of having an emulator within the Android environment?The emulator lets developers “play” around an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.7) What is the use of an activityCreator?An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.8 ) Describe Activities.Activities are what you refer to as the window to a user interface. Just as you create windows in order to display output or to ask for an input in the form of dialog boxes, activities play the same role, though it may not always be in the form of a user interface.9) What are Intents?Intents displays notification messages to the user from within the Android enabled device. It can be used to alert the user of a particular state that occurred. Users can be made to respond to intents.10) Differentiate Activities from Services.Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.11) What items are important in every Android project?These are the essential items that are present each time an Android project is created:- AndroidManifest.xml- build.xml- bin/- src/- res/- assets/12) What is the importance of XML-based layouts?The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.13) What are containers?Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.14) What is Orientation?Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented asa row or as a column. Values are set as either HORIZONTAL or VERTICAL.15) What is the importance of Android in the mobile market?Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.16) What do you think are some disadvantages of Android?Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.17) What is adb?Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.18) What are the four essential states of an activity?- Active – if the activity is at the foreground- Paused – if the activity is at the background and still visible- Stopped – if the activity is not visible and therefore is hidden or obscured by another activity- Destroyed – when the activity process is killed or completed terminated19) What is ANR?ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.20) Which elements can occur only once and must be present?Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.21) How are escape characters used as attribute?Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’22) What is the importance of settings permissions in app development?Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.23) What is the function of an intent filter?Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.24) Enumerate the three key loops when monitoring an activity- Entire lifetime – activity happens between onCreate and onDestroy- Visible lifetime – activity happens between onStart and onStop- Foreground lifetime – activity happens between onResume and onPause25) When is the onStop() method invoked?A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.26) Is there a case wherein other qualifiers in multiple resources take precedence over locale?Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.27) What are the different states wherein a process is based?There are 4 possible states:- foreground activity- visible activity- background activity- empty process28) How can the ANR be prevented?One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.29) What role does Dalvik play in Android development?Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.30) What is the AndroidManifest.xml?This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.31) What is the proper way of setting up an Android-powered device for app development? The following are steps to be followed prior to actual application development in an Android-powered device:-Declare your application as "debuggable" in your Android Manifest.-Turn on "USB Debugging" on your device.-Set up your system to detect your device.32) Enumerate the steps in creating a bounded service through AIDL.1. create the .aidl file, which defines the programming interface2. implement the interface, which involves extending the inner abstract Stub class as well as implanting its methods.3. expose the interface, which involves implementing the service to the clients.33) What is the importance of Default Resources?When default resources, which contain default strings and files, are not present, an error will occur and the app will not run. Resources are placed in specially named subdirectories under the project res/ directory.34) When dealing with multiple resources, which one takes precedence?Assuming that all of these multiple resources are able to match the configuration of a device, the ‘locale’ qualifier almost always takes the highest precedence over the others.35) When does ANR occur?The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.36) What is AIDL?AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.37) What data types are supported by AIDL?AIDL has support for the following data types:-string-charSequence-List-Map-all native Java data types like int,long, char and Boolean38) What is a Fragment?A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.39) What is a visible activity?A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.40) When is the best time to kill a foreground activity?The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.41) Is it possible to use or add a fragment without using a user interface?Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment,string) method to add a fragment from the activity.42) How do you remove icons and widgets from the main screen of the Android device?To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.43) What are the core components under the Android application architecture?There are 5 key components under the Android application architecture:- services- intent- resource externalization- notifications- content providers44) What composes a typical Android application project?A project under Android development, upon compilation, becomes an .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.45) What is a Sticky Intent?A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.46) Do all mobile phones support the latest Android operating system?Some Android-powered phone allows you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version. It depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.47) What is portable wi-fi hotspot?Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.48) What is an action?In Android development, an action is what the intent sender wants to do or expected to get as a response. Most application functionality is based on the intended action.49) What is the difference between a regular bitmap and a nine-patch image?In general, a Nine-patch image allows resizing that can be used as background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.50) What language is supported by Android for application development?The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.Guru99 Provides FREE ONLINE TUTORIAL on Various courses likeJava MIS MongoDB BigData CassandraWeb Services SQLite JSP Informatica AccountingSAP Training Python Excel ASP Net HBase ProjectTest Management Business Analyst Ethical Hacking PMP ManagementLive Project SoapUI Photoshop Manual Testing Mobile TestingData Warehouse R Tutorial Tableau DevOps AWSJenkins Agile Testing RPA JUnitSoftware EngineeringSelenium CCNA AngularJS NodeJS PLSQL。

androind manifest 权限定义

androind manifest 权限定义

androind manifest 权限定义
在AndroidManifest文件中,权限定义通常包括以下几个方面:
- Permission权限:指一系列“Android.Permission.*”对象。

在android.Manifest.permission.java类中可以找到Android定义的所有Permission权限。

如果应用程序需要访问Android通过“Permission”定义的内容,则该应用程序必须在AndroidManifest.xml中配置使用到的“Permission”,否则Android将会拒绝该应用程序访问。

- Root权限:指的是根权限,它允许应用程序执行一些需要超级用户权限的操作,例如修改系统设置或访问受保护的文件。

- Bootloader的解锁:指的是引导加载程序的解锁,它允许应用程序修改设备的引导加载程序,以便进行一些高级的操作,例如刷机或修改系统配置。

- Radio(基带)解锁:指的是基带的解锁,它允许应用程序修改设备的基带,以便进行一些高级的通信操作,例如修改信号强度或切换网络模式。

在定义权限时,开发者应该根据应用程序的需求和安全考虑,选择适当的权限,并在AndroidManifest文件中正确地声明它们。

这样可以确保应用程序的安全性和用户隐私得到保护。

Android应用程序的权限管理与隐私保护

Android应用程序的权限管理与隐私保护

Android应用程序的权限管理与隐私保护随着智能手机的普及,Android应用程序的使用越来越广泛。

然而,与此同时,我们也面临着隐私泄露的风险。

为了保护用户的隐私,Android系统引入了权限管理机制。

本文将探讨Android应用程序的权限管理与隐私保护。

一、权限管理的重要性权限管理是Android系统中的一项重要功能,它允许用户选择应用程序能够访问哪些资源和执行哪些操作。

例如,一个社交媒体应用程序可能需要访问用户的联系人列表和相册,而一个游戏应用程序可能需要访问用户的位置信息。

通过权限管理,用户可以控制应用程序对自己隐私的访问程度,从而保护个人信息的安全。

二、权限分类与授权机制Android系统将权限分为两类:普通权限和危险权限。

普通权限是指应用程序需要的一些基本权限,如访问网络、读取设备状态等。

这些权限在应用程序安装时自动授予,用户无需进行确认。

危险权限是指可能涉及用户隐私的权限,如读取联系人、获取位置信息等。

这些权限需要用户在应用程序运行时进行确认,用户可以选择授权或拒绝。

Android系统的权限授权机制使用了运行时权限模型。

当应用程序需要访问危险权限时,系统会弹出一个对话框,询问用户是否授权。

用户可以选择授权或拒绝。

如果用户选择拒绝,应用程序将无法访问相关权限,但仍可正常使用其他功能。

三、隐私保护的挑战尽管Android系统提供了权限管理机制,但隐私保护仍然面临一些挑战。

首先,一些应用程序可能滥用权限,收集用户的个人信息并用于商业目的。

其次,一些应用程序可能存在漏洞,导致用户的隐私信息被黑客攻击窃取。

此外,一些应用程序可能通过与其他应用程序共享数据,间接泄露用户的隐私。

为了应对这些挑战,用户需要保持警惕。

在安装应用程序时,应仔细阅读权限列表,并考虑应用程序所需权限是否合理。

此外,用户还可以通过安装安全软件来检测应用程序的行为,防止隐私泄露。

四、用户隐私保护的建议为了更好地保护用户隐私,除了权限管理外,我们还可以采取以下措施:1. 定期审查应用程序权限:在设置中,可以找到应用程序权限管理的选项。

android权限大全代码

android权限大全代码
51.
52.android.permission.CAMERA
53.请求访问使用照相设备(Required to be able to access the camera device. )
54.
55.android.permission.CHANGE_COMPONENT_ENABLED_STATE
87.
88.android.permission.DISABLE_KEYGUARD
89.允许程序禁用键盘锁(Allows applications to disable thekeyguard)
90.
91.android.permission.DUMP
92.允许程序返回状态抓取信息从系统服务(Allows an application to retrieve state dump information from system services.)
81.
82.android.permission.DEVICE_POWER
83.允许访问底层电源管理(Allows low-level access to power management)
84.
85.android.permission.DIAGNOSTIC
86.允许程序RW诊断资源(Allows applications to RW to diagnostic resources. )
1.android.permission.ACCESS_CHECKIN_PROPERTIES
2.允许读写访问”properties”表在checkin数据库中,改值可以修改上传( Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded)

Android权限列表permission说明

Android权限列表permission说明

Android权限分的很细,但命名比较人性化,Android permission比Symbian Capabilities有了不少改进,下面就来看看权限许可都有哪些定义吧,发现还是比较繁多的,如果发现你的程序某个地方调试错误很可能是Android permission的访问控制在作怪,这也是为了安全防止手机成为病毒的场所。

Android开发网获取到的消息来看不用购买高昂的数字签名证书,权限许可权由用户决定而不是手机制造商和平台提供商,这一点不得不说明为Android开发人员着想,下面的信息都是需要添加在androidmanifest.xml文件中。

ACCESS_COARSE_LOCATION是有关错略的位置信息获取,比如说MyLocation API调用获取的Cellid等定位信息必需添加android.permission.ACCESS_COARSE_LOCATION这个声明ACCESS_FINE_LOCATION、ACCESS_LOCATION_EXTRA_COMMANDS、ACCESS_MOCK_LOCATION是有关GPS定位获取的信息使用GPS LocationProvider类的相关定位信息必需声明android.permission.ACCESS_FINE_LOCATION、android.permission.ACCESS_LOCATION_EXTRA_COMMANDS和android.permission.ACCESS_MOCK_LOCATIONACCESS_NETWORK_STATE是获取网络状态的权限控制,如果获取当前GSM网络相关信息必需在androidmanifest.xml中声明android.permission.ACCESS_NETWORK_STATE这句。

ACCESS_SURFACE_FLINGER是使用SurfaceFlinger底层API的令牌,必需声明android.permission.ACCESS_SURFACE_FLINGERACCESS_WIFI_STATE权限可以获取使用Wi-Fi等WLAN无线网络,加入android.permission.ACCESS_WIFI_STATE这句ADD_SYSTEM_SERVICE是系统服务数据库的管理权限,比如添加一个系统服务必需声明android.permission.ADD_SYSTEM_SERVICEBATTERY_STATS是获取Android平台上电池设备的权限令牌,必需声明android.permission.BATTERY_STATS才可以获得电池信息BLUETOOTH蓝牙信息类,获取相关的蓝牙信息必声明android.permission.BLUETOOTHBLUETOOTH_ADMIN是蓝牙管理权限包含了身份安全认证,必需添加android.permission.BLUETOOTH_ADMIN类BRICK"android.permission.BRICK"BROADCAST_PACKAGE_REMOVED是广播包移除类权限,可以移除指定的系统消息,必需声明android.permission.BROADCAST_PACKAGE_REMOVED这句BROADCAST_STICKY"android.permission.BROADCAST_STICKY"CALL_PHONE是允许Android手机拨打电话时使用的权限"android.permission.CALL_PHONE"CALL_PRIVILEGED"android.permission.CALL_PRIVILEGED"CAMERA是摄像头权限控制,可以管理照相功能的启用"android.permission.CAMERA"CHANGE_COMPONENT_ENABLED_STATE"android.permission.CHANGE_COMPONENT_ENABLED_STATE"CHANGE_CONFIGURATION是控制Android系统设置等敏感信息的权限,修改时必需有android.permission.CHANGE_CONFIGURATION声明。

Android权限列表permission说明

Android权限列表permission说明

Android权限列表permission说明public static final String BROADCAST_PACKAGE_REMOVED允许应用程序发出一个应用程序被删除的通知。

常量值:"android.permission.BROADCAST_PACKAGE_REMOVED"public static final String CALL_PHONE允许应用程序发起一个电话呼叫而不需要经拨号器用户界面确认。

常量值:"android.permission.CALL_PHONE"public static final String DUMP允许应用程序从系统服务获取状态存储信息。

常量值:"android.permission.DUMP"public static final String FOTA_UPDATE常量值:"android.permission.FOTA_UPDATE"public static final String GET_TASKS允许应用程序获得当前运行任务的信息:任务的简短描述,运行着什么activity等。

常量值:"android.permission.GET_TASKS"public static final String INSTALL_PACKAGES允许应用程序安装包。

常量值:"android.permission.INSTALL_PACKAGES"public static final String INTERNAL_SYSTEM_WINDOW允许应用程序打开作为系统用户界面的一部分的窗口。

常量值:"android.permission.INTERNAL_SYSTEM_WINDOW"public static final String RAISED_THREAD_PRIORITY允许应用程序获取提升的线程优先级,例如实时音频重放。

androidauto权限要求

androidauto权限要求

androidauto权限要求摘要:1.简介2.Android Auto 的权限要求3.权限的具体内容4.为什么需要这些权限5.如何处理权限请求6.结论正文:随着科技的不断发展,智能手机在我们的生活中扮演着越来越重要的角色。

Android Auto 是谷歌推出的一款将智能手机与汽车信息娱乐系统无缝连接的应用,为用户提供更为便捷的驾驶体验。

然而,要使用Android Auto,用户需要为该应用授权一些权限。

那么,Android Auto 的权限要求是什么呢?我们又为什么要授权这些权限呢?本文将为您详细解答。

首先,让我们了解一下Android Auto 的权限要求。

为了正常运行,Android Auto 需要以下权限:1.电话权限:允许应用访问和管理电话功能,如接听电话、拨打电话等。

2.短信权限:允许应用访问和管理短信功能,如查看、发送和删除短信等。

3.通讯录权限:允许应用访问和管理用户的联系人数据,如添加、删除或修改联系人信息等。

4.存储权限:允许应用访问和管理设备上的存储空间,如读取、写入或删除文件等。

5.位置权限:允许应用访问和管理设备的地理位置数据,如获取当前地理位置、搜索附近地点等。

接下来,我们来了解一下这些权限的具体内容。

电话权限使Android Auto 能够在有电话接入时自动暂停音乐播放,并在通话结束后自动恢复。

短信权限则使得Android Auto 能够在不影响驾驶的情况下,方便地查看和回复短信。

通讯录权限使Android Auto 能够自动读取联系人信息,以便在发送短信或拨打电话时自动填充联系人信息。

存储权限使Android Auto 能够保存和加载用户设置,如导航路线、音乐播放列表等。

位置权限则使Android Auto 能够为用户提供实时的导航服务。

那么,为什么我们需要授权这些权限呢?原因很简单,这些权限都是为了让Android Auto 更好地为用户提供服务。

例如,电话权限使Android Auto 能够在接到电话时自动暂停音乐播放,以免错过重要电话;短信权限则使Android Auto 能够在查看和回复短信时,减少用户的操作步骤,提高驾驶安全性。

android相机权限申请 文案

android相机权限申请 文案

android相机权限申请文案在您使用Android设备的相机应用程序时,您可能会遇到需要申请相机权限的情况。

相机权限是一项重要的权限,它允许应用程序访问您的设备相机和拍摄照片。

在申请相机权限之前,让我们了解一下为什么应用程序需要这个权限。

Android相机权限是为了保障用户的隐私和安全而设计的。

当您使用相机应用程序时,它可能需要访问您的相机硬件,以便拍摄照片或录制视频。

这对于各种应用程序来说都是必要的,如社交媒体应用程序、照片编辑应用程序和视频通话应用程序。

然而,一些应用程序可能滥用相机权限来窃取用户的隐私。

因此,Android引入了权限系统,以使用户能够控制应用程序对其设备的访问权限。

当您首次打开一个应用程序并尝试使用相机时,您将被要求授予该应用程序相机权限。

您可以选择允许或拒绝该权限。

如果您选择拒绝相机权限,该应用程序将无法访问您的相机,并且您将无法使用该应用程序进行照片拍摄或视频录制。

请注意,您可以在稍后的时间更改权限设置。

如果您在以后决定授予相机权限,您可以按照以下步骤操作:1. 打开您的设备的设置应用程序。

2. 滚动并找到“应用程序”或“应用程序管理器”选项。

3. 在应用程序列表中找到您想要授予相机权限的应用程序。

4. 点击该应用程序以打开其详细信息页面。

5. 在详细信息页面中,找到“权限”选项。

6. 点击“权限”选项以查看该应用程序已经获得的权限。

7. 找到相机权限并启用它。

请记住,在授予权限之前,仔细考虑该应用程序是否真的需要相机权限。

如果您对应用程序或开发者不信任,或者担心他们会滥用您的相机权限,那么最好不要授予相机权限。

总而言之,相机权限是确保我们的设备安全和保护个人隐私的一项重要权限。

在使用Android设备的相机应用程序时,我们需要明智地管理相机权限,并只为可信任的应用程序授予权限。

这将确保我们的照片和视频只在受信任的环境中使用,并保护我们的个人信息免受滥用。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
READ_SMS
允许应用读取短信息.
READ_SYNC_SETTINGS
允许应用读取同步的设置
READ_SYNC_STATS
允许应用读取同步的统计数据
REBOOT
重新启动设备的请求
RECEIVE_BOOT_COMPLETED
允许应用接收在系统完成启动后发出的ACTION_BOOT_COMPLETED广播信息
ACCOUNT_MANAGER
允许应用进入帐户认证
AUTHENTICATE_ACCOUNTS
允许应用为ACCOUNT_MANAGER扮演一个帐户认证系统
BATTERY_STATS
允许应用去统计电源信息
BIND_APPWIDGET
允许应用告诉AppWidget哪个应用能够访问该AppWidget的数据
READ_HISTORY_BOOKMARKS
允许应用去读取(非写)用户浏览历史和书签
READ_INPUT_STATE
允许应用去的当前键盘和控制的状态
READ_LOGS
允许应用读取低级别的系统日志文件
READ_OWNER_DATA
允许应用读取所有者的数据
READ_PHONE_STATE
允许读取电话的状态
允许应访问额外的提供定位的指令
ACCESS_MOCK_LOCATION
允许应用创建用于测试的模拟定位提供者
ACCESS_NETWORK_STATE
允许应用访问网络上的信息
ACCESS_SURFACE_FLINGER
允许应用使用低版本视图的特征
ACCESS_WIFI_STATE
允许应用访问关羽Wi-Fi网络的信息
ACCESS_CHECKIN_PROPERTIES
允许在登入数据库的时候读写其中的属性表,并上传改变的值
ACCESS_COARSE_LOCATION
允许应用访问范围(如WIFI)性的定位
ACCESS_FINE_LOCATION
允许应用访问精确(如GPS)性的定位
ACCESS_LOCATION_EXTRA_COMMANDS
已废弃使用
SEND_SMS
允许应用发送短消息.
SET_ACTIVITY_WATCHER
允许应用查看和控制activities是怎样在系统中运行的
SET_ALWAYS_FINISH
允许应用去控制当activities被覆盖后是否是立即接触结束
SET_ANIMATION_SCALE
改变动画的比例因子
SET_DEBUG_APP
BIND_DEVICE_ADMIN
必须通过关机接收者的请求来确保只有系统能够与之交互
BIND_INPUT_METHOD
必须通过InputMethodService的请求来确保只有系统能够与之绑定
BIND_WALLPAPER
必须通过WallpaperService的请求来确保只有系统能够与之绑定
BLUETOOTH
INSTALL_LOCATION_PROVIDER
允许应用安装一个位置提供商到位置管理器中
INSTALL_PACKAGES
允许应用安装程序包.
INTERNAL_SYSTEM_WINDOW
允许应用打开被部分系统用户接口使用的窗口
INTERNET
允许应用打开网络套接口
KILL_BACKGROUND_PROCESSES
允许应用设置壁纸
SET_WALLPAPER_HINTS
允许应用设置锁定的壁纸
SIGNAL_PERSISTENT_PROCESSES
允许应用发出一个给所有稳定进程信号的请求
STATUS_BAR
允许应用打开、关闭或使状态栏或图标失去作用
SUBSCRIBED_FEEDS_READ
允许应用访问内容提供者的签署认证
允许应用修改全局音频设定
MODIFY_PHONE_STATE
允许改变拨打电话的状态-电源等
MOUNT_FORMAT_FILESYSTEMS
允许格式化可移除的存储仓库的文件系统
MOUNT_UNMOUNT_FILESYSTEMS
允许装备或解除可移除的存储仓库的文件系统
PERSISTENT_ACTIVITY
RECEIVE_MMS
允许应用去监听多媒体信息并记录和对起进行处理
RECEIVE_SMS
允许应用去监听短消息并记录和对起进行处理
RECEIVE_WAP_PUSH
允许应用监听WAP push信息
RECORD_AUDIO
允许应用记录音频信息
REORDER_TASKS
允许应用改变任务的关系位置
RESTART_PACKAGES
允许应用进入Wi-Fi的组播方式
CHANGE_WIFI_STATE
允许应用改变Wi-Fi的连接状态
CLEAR_APP_CACHE
允许应用清除所有安装在设备上的应用的缓存
CLEAR_APP_USER_DATA
允许应用清除使用者的信息资料
CONTROL_LOCATION_UPDATES
允许从广播设备来更新或不更新本地的消息
允许应用写(非读)用户的外部存储器
WRITE_GSERVICES
允许应用修改Google服务地图
WRITE_HISTORY_BOOKMARKS
允许应用写(非读)用户的浏览器历史和书签
WRITE_OWNER_DATA
允许应用写(非读)用户的数据
WRITE_SECURE_SETTINGS
允许应用写或读当前系统设置
能够启动照相机设备的请求
CHANGE_COMPONENT_ENABLED_STATE
允许应用去改变一个应用是否是激活状态
CHANGE_CONFIGURATION
允许应用修改当前的配置,如本地设置
CHANGE_NETWORK_STATE
允许应用改变网络的连接状态
CHANGE_WIFI_MULTICAST_STATE
允许应用使它的activities更持久稳固
PROCESS_OUTGOING_CALLS
允许应用监督、限定或终止呼出的电话
READ_CALENDAR
允许应用读取用户的日历数据
READ_CONTACTS
允许应用读取用户的联系人数据
READ_FRAME_BUFFER
允许应用抓取屏幕和更多可获得的缓冲数据
DELETE_CACHE_FILES
允许应用删除掉缓存文件
DELETE_PACKAGES
允许应用删除掉程序包
DEVICE_POWER
允许低权限的访问电源管理项
DIAGNOSTIC
允许应用诊断程序资源
DISABLE_KEYGUARD
允许应用禁用键盘锁
DUMP
允许应用从系统服务中恢复转储的信息
EXPAND_STATUS_BAR
GET_TASKS
允许应用找到关于当前或最近运行的任务和在哪些acitivities里运行
GLOBAL_SEARCH
这个权限可以被内容提供者用来允许使用全程搜索他们的数据
HARDWARE_TEST
允许访问硬件及周边设备.Biblioteka INJECT_EVENTS
允许应用注入用户事件(键盘、触摸)到事件中然后提供给任意的窗口
允许应用扩大或缩小状态栏
FACTORY_TEST
如制造商测试的应用一样用终极权限用户运行
FLASHLIGHT
允许访问手电筒
FORCE_BACK
允许应用强制的返回操作而不论是不是最终的activity
GET_ACCOUNTS
允许应用访问账目服务中的统计清单
GET_PACKAGE_SIZE
允许应用查找出任何程序包使用的空间
BROADCAST_WAP_PUSH
允许应用发出一个收到WAP PUSH的广播消息
CALL_PHONE
允许应用启动一个用户确认电话被拨打而不通过拨打电话的用户界面的的拨打程序
CALL_PRIVILEGED
允许应用启动一个用户确认电话被拨打而不通过拨打电话的用户界面的的任意号码的拨打,包括紧急号码.
CAMERA
允许应用去呼叫killBackgroundProcesses(String).方法
MANAGE_ACCOUNTS
允许应用去管理帐户管理者中的重要清单
MANAGE_APP_TOKENS
允许应用去管理(创建、销毁、顺序)在窗口管理者中的应用
MASTER_CLEAR
MODIFY_AUDIO_SETTINGS
SUBSCRIBED_FEEDS_WRITE
SYSTEM_ALERT_WINDOW
允许应用使用TYPE_SYSTEM_ALERT来打开窗口,并将窗口显示于其他应用的顶端
UPDATE_DEVICE_STATS
允许应用更新设备资料信息
USE_CREDENTIALS
允许应用从管理器得到授权请求
VIBRATE
设置一个应用为调试模式
SET_ORIENTATION
允许低级别的设置屏幕的方向
SET_PREFERRED_APPLICATIONS
已废弃
SET_PROCESS_LIMIT
允许应用设置可以运行的最大数的应用进程
SET_TIME
允许应用设置系统时间
SET_TIME_ZONE
允许应用设置系统时区时间
SET_WALLPAPER
WRITE_SETTINGS
允许应用写或读系统设置
WRITE_SMS
允许应用写短消息信息
WRITE_SYNC_SETTINGS
允许应用写同步设置
允许应用访问震动器
WAKE_LOCK
允许使用电源锁定管理以使进程休眠或屏幕变暗
相关文档
最新文档