Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could I contain permission name in string res

Sample code:

<permission
    android:name="@string/permission_name"
    android:protectionLevel="signature" >
</permission>

Error while building: missing name attribute in element .

But I don't want to duplicate permission name in my different applications. Is exist some way for fix it and contain permission in resources?

like image 943
HotIceCream Avatar asked Oct 22 '22 07:10

HotIceCream


1 Answers

No, that's impossible. Take a look here. You can use resources to specify a label, but not the name:

The name must be unique, so it should use Java-style scoping — for example, "com.example.project.PERMITTED_ACTION".

like image 194
Flavio Avatar answered Oct 24 '22 18:10

Flavio