How to ask user to change default applications

I want to prompt the user to choose which application he wants to use by default. (in this case, it is between my custom launcher installation or the standard Android launcher)

I watched Google, Qaru and Android API Docs in recent hours, hoping to find a solution for this.

I think that so far I have managed to collect quite a lot of information, but please correct me if I am wrong:

  • Application cannot make default application
  • An application cannot prevent other applications from being standard (other than that itself)
  • The only way to counter point 1 is the addPreferredActivity () method, which was deprecated
  • There is a workaround that involves creating fake activity. However, it looks like it stopped working after Android version 4.4.2.

In addition, most of the information I found on this subject was over 4 years old.

I have successfully implemented the workaround mentioned in paragraph 4, but I'm afraid that it may not work with Android versions 4.4.1

So here is my question:

How can I suggest the user to change the default application?
(Keep in mind that perhaps another application is set to Always)

Here is an example of what I am saying:

android chooser

Thanks in advance!

+4
source share

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


All Articles