I have been searching the net for the past few days and so far I have not come up with much. What I want to know is how do I get the box up where you can chose the default home app. I currently have not seen how to get this dialogue box up on a button click(for instance).
EDIT: The dialogue I am talking about is the one used in toddler lock, looks like this.
Old question but still comes up when googling, so will post a modern answer because the accepted answer is now outdated.
Android can automatically prompt to set default home app when opening the app for the first time, but this is unreliable from my testing.
Try this (kotlin):
context.startActivity(Intent(Settings.ACTION_HOME_SETTINGS));
This will take the user to a settings screen where they can pick one of the installed launcher apps.
Credits to this answer on a similar question: https://stackoverflow.com/a/33210787/6457336