Android stopped state

suggest change

Starting with Android 3.1, an application is placed in the stopped state when it is installed. While it is stopped, it will not run unless the user launches an activity, or an explicit intent targets one of its activities, services, or broadcast receivers.

A system app that installs APKs itself must account for this. The new app will not receive ordinary broadcasts until it leaves the stopped state.

One way to activate it is to send an explicit broadcast. Many apps declare an INSTALL_REFERRER receiver, which can be used as the target.

Read the installed app’s manifest and send an explicit broadcast to that receiver:

Intent intent = new Intent();
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
intent.setComponent(new ComponentName(packageName, fullClassName));
sendBroadcast(intent);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents