How to enforce the custom permission on an Activity in Android?

后端 未结 1 1941
猫巷女王i
猫巷女王i 2021-02-07 01:09

I have created a custom permission in android as:



        
1条回答
  •  [愿得一人]
    2021-02-07 02:00

    Use android:permission attribute into activity tag.

    Like below

    
    

    And you need to add uses-permission to your custom permission, when your other application needs to launch this activity.

    
    

    An In-Depth Introduction to the Android Permission Model is a very good article to understand permission in Android. And How to use custom permissions in Android? is also a very good SO thread.

    0 讨论(0)
提交回复
热议问题