There is an application A , which has ROOT rights. It is necessary that application A can install itself or other applications as the “default application”. For example for: receive / send SMS, go to URL, etc.

How can this be done programmatically (without asking the user)?

    1 answer 1

    This information is stored in /data/system/users/0/settings_secure.xml . For example, the default SMS application is stored in the element with the sms_default_application key:

     <setting id="85" name="sms_default_application" value="com.google.android.talk" package="com.android.settings" /> 

    Details can be found in the Settings.Secure class.

    Accordingly, if you have root rights, you can programmatically change this file.