Difference between Uses-Permission tag and Permissions in AndroidManifest.xml

What is the difference between Uses-Permission and Permissions tags in AndroidManifest.xml . I understood the Uses-Permission tag because it is used to access the Internet, location from our application. But I did not understand when and why we should use the permission tag in the manifest file and what is its difference from Uses-Permission .

Thanks Advance,

+54
android
Oct 03 2018-10-10
source share
1 answer

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.

+89
03 Oct 2018-10-10
source share
— -



All Articles