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">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <data
                    android:host="without_icon"
                    android:scheme="cn.xiayiye5.app" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
 </activity>

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
        startActivity(intent)

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

Origin blog.csdn.net/xiayiye5/article/details/111587476