Android (Java) Learning notes 121:android.intent.action.main and Android.intent.category.LAUNCHER understanding

Source: Internet
Author: User

Let's take a look at the internet saying:

Android.intent.action.MAIN determines which application starts first

Activity Android.intent.category.LAUNCHER Determines whether the application appears in the program list

Have you found a problem after passing the experiment?
MAIN and LAUNCHER are not simply the things of each tube;
Personally, it's the right thing to say
                The result of my test is that If an app doesn't have launcher, the APK can still be installed on the device, but it won't be visible on the desktop. If the activity is set to the launcher, and the main is set at the same time, the activity can appear in the program icon, if there is no main, you do not know which activity to start, so there will be no icon appears. Visible, main refers to which activity is started after clicking on the icon. Of course, main can give multiple activity settings, but only set main does not set launcher, still can't enter activity.                  Visible, Both the main and launcher settings make sense, and if multiple activity is set at the same time, there will be two icons that enter different activity first. For example: Lift_cycles 01 and Lift_cycles 02
<activity android:name= ". Life_cyclesactivity "            android:label=" Lift_cycles ">      <intent-filter>          <action Android:name= "Android.intent.action.MAIN"/>          <category android:name= "Android.intent.category.LAUNCHER" />      </intent-filter>  </activity>  <activity android:name= " Life_cyclesactivity02 "            android:label=" Lift_cycles ">       <intent-filter>          < Action android:name= "Android.intent.action.MAIN"/>          <category android:name= " Android.intent.category.LAUNCHER "/>        </intent-filter>  

Android (Java) Learning note 121:android.intent.action.main and Android.intent.category.LAUNCHER understanding

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.