4

I need to avoid the launch of a specific task once Android has booted (I'm not speaking about protected system tasks).

Once I have obtained the autostart task list, is there any way to remove the selected task from the autostart routine?

Nick
  • 3,504
  • 2
  • 39
  • 78
Kane
  • 43
  • 4
  • Other than things the system starts, there's no such thing as an "autostart" task in Android. If you can be more specific, it might be more clear what you're trying to do so you can get a useful answer. – mah Dec 24 '12 at 13:04
  • @mah whenh you install some app these adds a process that opens at the system start, with android assistant you can get these and choose what process block, howevere this doesn't remove these, simply block the selected task after the start. – Kane Dec 24 '12 at 13:09
  • ok, so what you're talking about is an application that installs a BOOT_COMPLETED receiver, and when it receives that broadcast, it must be starting some service. http://stackoverflow.com/questions/5624470/enable-and-disable-a-broadcast-receiver is a question (and answer) related to disabling components programatically, it might help you. – mah Dec 24 '12 at 13:12

1 Answers1

1

I need to avoid the start of specific task at the start of android

The user can uninstall the application that has this "specific task", if the user wants.

Once I have obtained the autostart task list, is there any way to remove the selected of these by the autostart routines?

You have no means of preventing ACTION_BOOT_COMPLETED receivers from functioning. The user can uninstall the application that has this "specific task", if the user wants.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • but the user could want to mantain the application but not the autostart-task to avoid resource draining... for example I have a nice torrent downloader app installed but isn't necessary that is task start with the OS since I can open the app when I need to download torrent, same thing for ebay app etc. – Kane Dec 24 '12 at 13:35
  • @Kane: "but the user could want to mantain the application but not the autostart-task to avoid resource draining" -- users should find a better-written app, contact the developer to ask for a preference to control the behavior, or simply give the app a lousy review. Some ROM mods also allow the user to block startup logic, IIRC. However, one ordinary SDK app cannot, and should not, be able to prevent another ordinary SDK app from functioning, which is what you are asking for. – CommonsWare Dec 24 '12 at 13:39
  • If the ordinary SDK cannot, I have the answer to my question, however preventing another ordinary app to start has several useful vantages. I cannot contact all developers to change their app and some app hasn't valid alternatives, so when many installed app add their autostart-task, the device becames slow at the startup. – Kane Dec 24 '12 at 13:45