Documentation citation:
To enforce your own rights, you must first declare them in your AndroidManifest.xml
using one or more <permission>
. For example, an application that wants to control who can start one of its actions can declare permission for this operation as follows:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.me.app.myapp" > <permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY" android:label="@string/permlab_deadlyActivity" android:description="@string/permdesc_deadlyActivity" android:permissionGroup="android.permission-group.COST_MONEY" android:protectionLevel="dangerous" /> </manifest>
Therefore, <uses-permission>
is when your application asks the user permission to use a function, and <permission>
is when your application requires other applications to ask the user for permission to use any of your functions.
CommonsWare 03 Oct 2018-10-10 19:06
source share