What do you mean with "autostart"? The App's UI or a service? What do you need to achieve?
UI: Not recommended as it is a "bad behaviour" when an app "just starts" out of the blue and disturbs your current activity
Service: Start the service as a foreground service and use a timer to process whatever you need. Backgroundservices won't work anymore/properly on newer devices.
What do you mean with "autostart"? The App's UI or a service? What do you need to achieve?
UI: Not recommended as it is a "bad behaviour" when an app "just starts" out of the blue and disturbs your current activity
Service: Start the service as a foreground service and use a timer to process whatever you need. Backgroundservices won't work anymore/properly on newer devices.
by Autostart I mean APP starts at pre-set time without user starting it after user has closed it. IE: 1. The app is running then 2. user closes it then 3.App starts at pre-set time without user having started it with the device having been kept on (not been shut down or rebooted by user) during all this time.
Actually what I really want to do is have the app, not close when it has been closed by the user pressing the "home" key and then pressing "close all". This is an app that should run and stay running whenever the device is on. Is it possible to have the app stay running when the "close all" is pressed (and only close when the app is individually and explicitly closed by the user?)