Android-Permission V1.0
Android Permission大全出自1.0 SDK中记录着新改变的访问权限许可。程序执行需要读取到安全敏感项必需在androidmanifest.xml中声明相关权限请求,完整列表如下:
PS:在开发中,调用到系统功能的时候,如果程序代码逻辑无错,但是被强行终止多半都是因为权限的原因。
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_COMMANDS允许应用程序访问额外的位置提供命令(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)
Drupal-一些权限的判断
按登录非登录判断:
< ?php
global $user;/*是否为登录用户*/
if ($user -> uid){/*如果是当前浏览者为登录用户则显示下面的内容*/
print ;
}
else {/*如果是当前浏览者为非登录用户则显示下面的内容*/
print ;
}
?>
按用户uid判断,这个很适合把一些特定区块只显示给管理员:
< ?php
global $user;/*是否为登录用户*/
if ($user -> uid == 10){/*如果是当前浏览者登录且uid等于10则显示下面的内容*/
print ;
}
else {/*如果是当前浏览者uid不等于10则显示下面的内容*/
print ;
}
?>
按角色判断,给不同用户组显示不同的内容:
< ?php
global $user;/*是否为登录用户*/
if (in_array('vips',$user ->roles)) {/*假定有一个角色,叫做'vips',如登录用户属于该用户组,则显示以下内容*/
print ;
}
else{/*若不属于'vips';用户组则显示以下内容*/
print ;
}
?>
判断用户是否有编辑权限:
< ?php
if (node_access('update', $node)){/*如果用户有编辑当前节点的权限,则显示以下内容。*/
print ;/*通常这儿是当前节点的编辑链接*/
}
else{/*如果没有,则显示以下内容。*/
print
}
?>
Categories
- AIR+FB+AS3 (157)
- Android (22)
- Demo (71)
- fDEV (3)
- Flash AS2 (65)
- Game (17)
- jQuery (14)
- Others (93)
- PHP (42)
- Wordpress (60)
Recent Comments
- DFdou says under AS3-Caurina 动画类import caurina.transitions.Tweener; import caurin...
- DFdou says under Android-Permission V1.0:jrjr
- DFdou says under AS3-Captcha验证码类@太阴真人, HI,可以提供下具体是第几行报的错么
- 太阴真人 says under AS3-Captcha验证码类1084: 语法错误: rightparen 应在 semicolon 之前。 1084: 语法...
- DFdou says under Air-fWeather Google Weather Api使用例子@soluo, 是这个没错,这个数据的确是乱七八糟的,不是很准确~
- soluo says under Air-fWeather Google Weather Api使用例子博主,您好,请教您一个Google Weather Api的问题: 我用Google Weather...
- Anonymous says under Android-ListView用法:dahan
- DFdou says under Android-一些常用技巧手动调用MEDIA_SCANNER: Intent intent = new Intent(Inte...
- DFdou says under Flex – MXML组件开发@冬瓜, :dahan
- 冬瓜 says under Flex – MXML组件开发豆腐啊 你写的东西都好技术啊! :wc
Blogroll
Archive
- March 2010 (4)
- February 2010 (13)
- January 2010 (9)
- December 2009 (19)
- November 2009 (23)
- October 2009 (17)
- September 2009 (22)
- August 2009 (13)
- July 2009 (20)
- June 2009 (18)
- May 2009 (18)
- April 2009 (29)
- March 2009 (31)
- February 2009 (46)
- January 2009 (37)
- December 2008 (16)
- November 2008 (12)
- October 2008 (21)
- September 2008 (10)
- August 2008 (12)
- July 2008 (14)
- June 2008 (8)
- May 2008 (11)