I decided that none of the methods was very good. I used the ownership of the device policy to prevent the installation of any other applications, wrote the application to launch (so we were the main screen), made it a system application and used the status manager apis (which are not well known) to remove the βRestβ button "and prevent the status bar from opening, so there was no way to launch any application other than mine.
source share