Set Android permission

If I want to create a custom address book (which overrides my default phone book for the phone), and if I want it to be used by all applications, what should be my intent-filter ? Can Android allow me to do such a thing, given the fact that such a third-party application could potentially be evil?

And, if I want to have another application for the address book, I suppose the second application also has the same intent-filter , right? How does the platform decide which application to choose if I click the Contacts button when making a call? In other words, how does the view resolve intentions in case there is a conflict between several intent-filters ?

+4
source share
2 answers

You can replace any application on the Android platform, even Home. The Android documentation explains everything there is to know about Intents and Intent Filters , and there is a section called "Resolution of Intent" that answers your question. The permission section for Intent has more information.

As far as I can tell, Android is not trying to resolve the conflict. It asks the user which application is starting, and gives them the opportunity to mark this action as the default value for this intent. They give an example of a mail application here .

+3
source

Although Mr. Smilyanich is mostly right, there is no contact application on Android so you can replace it. There is Dialtacts, this is an application that supports contacts, call log and dialer. This application cannot be replaced, mainly because dial-up cannot be replaced.

So, although you can override some intent filters and gain control over some contact-related requests, you will not be able to disable some of the Dialtacts contacts, which will confuse users.

0
source

Source: https://habr.com/ru/post/1301324/


All Articles