Android's Warm start up of Applications


      Android framework supports boot up notification (broadcasts) for applications to start after the device boots up or after the framework reboots. Framework has to start a new process to host the Broadcast Receiver component and this takes more processing time compared to an already existing process. The only alternative is to have the empty process created even before processing broadcast boot up event and this is a small time window in the context of device boot up and yet android supports this for applications installed as a part of the system image.

    All that is needed is to enable the application to be persistent in its manifest (android:persistent="true"). Activity Manager has the logic to create empty process (via zygote) for all persistent applications.

   The only downside being that this is supported only for system applications controlled by platform developers and support for 3rd party apps would need an android fork with necessary changes to the platform.

No comments: