首页 > 移动平台 > 详细

Android APP安装后不在桌面显示图标的应用场景

时间:2016-03-16 20:44:47      阅读:288      评论:0      收藏:0      [点我收藏+]

一般情况下是由于特殊情况下,需要隐藏app的启动入口,即在launcher界面不需要显示该入口,会由其他app跳转至。怎么设置如下代码:

 <activity
            android:name=".act.LoadingAct"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
               <!-- <category android:name="android.intent.category.LAUNCHER" />-->
            </intent-filter>
            <intent-filter>
            <action android:name="com.companyname.others" />
            <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

技术分享 如果出现这个小红叉,没关系的,主要是AS对AndroidManifest.xml进行了校验。直接运行即可,然后你可以在手机的设置里面找到应用管理,就可以找到你的app了。

启动该app的代码如下:

 Intent intent = new Intent();
 intent.setAction("com.companyname.others");
 intent.putExtra("userId", "xxx");
 startActivity(intent);

 

 

 

 

  

Android APP安装后不在桌面显示图标的应用场景

原文:http://www.cnblogs.com/royi123/p/5284928.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!