admin管理员组文章数量:1516870
项目开发中有时需要安装没有应用图标的应用,以下提供2中方法供参考使用:
第一种方式,在启动页的activity中添加schema,因为我们把app的入口Activity申明为由接收隐士的Intent来启动,这样自然也就不会显示图标了
<activity
android:name="net.dd.daemon.MainActivity"
android:theme="@style/OnePixelActivity"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<!--此处定义的schema供从外部调用-->
<data
android:host="net.dd.daemon"
android:path="/keep"
android:scheme="daemon"/>
</intent-filter>
</activity>
启动方式:
Uri uri = Uri.parse("daemon://net.dd.daemon/keep");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
context.startActivity(intent);
第二种方式,注释掉LAUNCHER
<activity
版权声明:本文标题:Android神操作:让你的应用图标消失在大众视线里 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1772216099a3272362.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论