Autostart one app after the device is started

@pepone assuming you don't want to implement Lock task mode yourself in your application / make your device managed by an MDM app we have a CLI service I referenced here.

You will need one of the more recent release builds to use the service above but it would allow you to set an application into an auto-start fashion that you described. I would strongly suggest trying this first.

If you still want to implement this in your app programmatically then the two approaches I would suggest is implementing Lock Task Mode in your application or making your app a custom Android launcher. These two options can introduce a lot of added complexity to your application if you choose to pursue them (you are basically turning your app into an MDM provider!)