Loading Process of Android launcher applications

Source: Internet
Author: User
The first boot process is as follows:

1. First, create a database

1. Create a database favorites table.

2. Load the default desktop configuration information from default_workspace.xml and write it to the database.

Ii. Load launcherapplication

1. Start the application subclass launcherapplication that the launcher has rewritten.

2. Create launchermodel and cache (used to cache the application icon and application title) in oncreate of application ).

3. Register broadcast and oberser related to package change (because launcher needs to update the application when it is installed or uninstalled ).

Note:

1. The launchermodel and cache are unrelated to the activity. their lifecycles are greater than those of the activity. When the activity is destroyed, the data in the launchermodel and cache can still be kept.

3. Start the launcher Activity

1. initialize the UI.

2. Call the startloader method of launchermodel to load the desktop and menu-related application information of launchermodel.

3. When launchermodel is loaded, launcher receives the relevant callback and initializes the UI Based on the loaded data information.

Note:

1. desktop icons can be customized, that is, they can be configured by users. Therefore, the information should be recorded, which is also in the database's favorites table.

2. the app of menu (all application pages) cannot be customized, and it is all the activities with the launcher attribute. That is to say, the data does not need to be specially stored, you only need to go to packagemanager every time you need it.

Simple collaboration Diagram

Loading the sequence of binding application data to the desktop and menu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.