A
A
Alexey Denisov2021-01-11 22:34:58
Android
Alexey Denisov, 2021-01-11 22:34:58

How to use android:protectionLevel?

Tell me how to work with android:protectionLevel, I can’t understand how to use it, everywhere a superficial description (normal, dangerous, signature)
I understand that it can be used to protect / limit code modification?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2021-01-12
@zagayevskiy

Most likely it's about permissions . As you can see from the link, you can only use it when you create your own permission. What is it for? For example, to protect a public ContentProvider from being accessed by applications signed with a different signature. You can sign all your applications with one signature, create a permission with android:protectionLevel="signature", set it in the ContentProvider, and then the content will be available only to your applications.
The same mechanism is used by system permissions.
It will not help to protect the code from modification in any way, it is not connected at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question