The black technology of Android development has no startup icon when installing APP

Look at the pictures of the old routines:


The implementation method is very simple. Just configure the data attribute in the startup Activity manifest file:

 <activity android:name=".MainActivity">
                <action android:name="android.intent.action.MAIN" />
                    android:scheme="" />
                <category android:name="android.intent.category.LAUNCHER" />

After the above configuration, after your apk is installed, the startup icon cannot be found on the desktop of your mobile phone. What should I do if I want to open this APP? It's easy to do it through implicit jumps

   val intent = Intent()
        // 两个参数意思 1:被打开APP的包名 2:被打开APP页面所在的activity路径
        val cn = ComponentName("com.xiayiye5.withouticonapp","com.xiayiye5.withouticonapp.MainActivity")
        intent.component = cn

The complete code can be viewed in the code base: source code download


Thanks again to the blogger for providing clues: blogger 1  blogger 2

Guess you like