Android API Guides 之 App Manifest(16) - <permission-group>

本文详细解释了Android中<permission-group>元素的使用方法,包括其语法、作用、属性及引入方式,帮助开发者更好地管理应用权限。

<permission-group>

SYNTAX:
<permission-group android:description="string resource"
                  android:icon="drawable resource"
                  android:label="string resource"
                  android:name="string" />
CONTAINED IN:
<manifest>
DESCRIPTION:
Declares a name for a logical grouping of related permissions. Individual permission join the group through the  permissionGroup attribute of the  <permission> element. Members of a group are presented together in the user interface.

Note that this element does not declare a permission itself, only a category in which permissions can be placed. See the <permission> element for element for information on declaring permissions and assigning them to groups.

ATTRIBUTES:
android:description
User-readable text that describes the group. The text should be longer and more explanatory than the label. This attribute must be set as a reference to a string resource. Unlike the  label attribute, it cannot be a raw string.
android:icon
An icon representing the permission. This attribute must be set as a reference to a drawable resource containing the image definition.
android:label
A user-readable name for the group. As a convenience, the label can be directly set as a raw string while you're developing the application. However, when the application is ready to be published, it should be set as a reference to a string resource, so that it can be localized like other strings in the user interface.
android:name
The name of the group. This is the name that can be assigned to a  <permission> element's <permissionGroup> attribute.
INTRODUCED IN:
API Level 1
SEE ALSO:
<permission> 
<permission-tree> 
<uses-permission>

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.isa.navi" android:sharedUserId="android.uid.system" android:versionCode="1" android:versionName="V0.9.0_20250621"> <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />--> <!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />--> <!-- <uses-permission android:name="android.permission.INTERNET" />--> <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />--> <!-- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />--> <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />--> <!-- <uses-permission android:name="android.permission.USB_PERMISSION"/>--> <!-- <uses-permission android:name="android.permission.WAKE_LOCK" />--> <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />--> <!-- <uses-permission android:name="android.permission.ACCESS_MAP_ISA"/>--> <application android:name="com.isa.navi.ui.ISANaviApplication" android:allowBackup="false" android:label="ISA-NaviService" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:taskAffinity="" android:persistent="true" > <!-- android:debuggable="true" --> <service android:name="com.isa.navi.service.ISANaviService" android:directBootAware="true" android:exported="false"> <!-- android:permission="com.isa.permission.ACCESS"--> <!-- >--> <intent-filter> <action android:name="com.isa.intent.action.ISA_NAVI" /> <action android:name="com.isa.intent.action.ISA_NAVI_DEBUG" /> <action android:name="com.isa.intent.action.ISA_CARPLAY" /> </intent-filter> </service> <receiver android:name="com.isa.navi.BootCompleteReceive" android:directBootAware="true" android:exported="false" > <!-- 开机广播 --> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.BOOT_COMPLETED" />--> <!-- </intent-filter>--> <intent-filter android:priority="2147483647"> <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" /> </intent-filter> </receiver> <!-- <activity android:name=".ui.MainActivity">--> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.MAIN" />--> <!-- <category android:name="android.intent.category.LAUNCHER" />--> <!-- </intent-filter>--> <!-- </activity>--> <receiver android:name=".receiver.USBReceiver" android:exported="false"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.MEDIA_MOUNTED"/> <action android:name="android.intent.action.MEDIA_UNMOUNTED" /> <action android:name="android.intent.action.MEDIA_REMOVED"/> <data android:scheme="file"></data> </intent-filter> </receiver> </application> </manifest> 这个xml是什么
最新发布
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值