2

As much as I know, most apps won't ever start, unless you launch them at least once (even if they have a background service).

But what about those, that for example, have the Receive Intent Boot Successfull in their Manifest? Will that be enough to launch their code?

6
  • You might want to take a look at my answer to a very similar question: android.stackexchange.com/a/107276/86358. Basically said: Yes if designed correctly apps may launch services or itself right after their installation.
    – GiantTree
    Jun 18, 2015 at 21:22
  • I highly doubt its possible to be done RIGHT AFTER the installation, unless it's possible to receive an intent after a Boot Complete, and then run Jun 18, 2015 at 21:30
  • Right after installation is very unlikely (unless you do an update). But there is the possibility to start by receiving an intent like ACTION_USER_PRESENT (sent whenever the device gets unlocked), ACTION_SCREEN_ON (when you turn on the screen and are able to use it) as well as ACTION_SCREEN_OFF (when you lock your phone for instance). All those intents can be received without being run once.
    – GiantTree
    Jun 18, 2015 at 21:34
  • So you the final decision is that an app can only run, if it has a Broadcast Receiver in the Manifest? And it doesn't have to be launched at least once in order for this Broadcast Receiver to receive Intents? Jun 18, 2015 at 21:39
  • Yes, that's the idea behind manifest intents: even if the app is not running it can receive an event intent and act on that without continuously running and probably wasting system resources.
    – GiantTree
    Jun 19, 2015 at 5:16

2 Answers 2

-1

Impossible, you must launch atleast once after installing.

2
  • 1
    source or something please? Jun 18, 2015 at 15:50
  • I'm afraid you are wrong. The principle of apps like Plan B or Android Lost is based exactly on that: you install the apps remotely (via GPlay's Web interface), and then can control your "lost device" remotely – not even a reboot is required. So if you were correct, those apps would not work. The apps' ratings suggest something else ;)
    – Izzy
    Jul 17, 2015 at 15:43
-1

Yes, Android apps can start background services after system boot or intent received. There are xposed modules (like defim's Boot manager or Receiver stop) that can prevent this behavior.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .