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