What is the alternative to uninstalling from AndroidManifest:
<activity android:name="com.apper.main.UserActivity" android:label="@string/app_name" android:launchMode="singleTask" android:clearTaskOnLaunch="true" android:stateNotNeeded="true" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME"/> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
I also found that after deleting the above line there was no effect on my android expression. What is the main use of this category and what is the alternative to it.
If the goal of this category is to launch the main screen, then this can be done as follows:
Intent homeIntent= new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(homeIntent);
This code above launches the main screen, but why the line in the android manifest? What is the purpose of removing the line from here does not change the application?
source share